Fix panic when terminating client

This commit is contained in:
Trevor Slocum 2023-11-14 08:41:14 -08:00
parent 019317f4f2
commit ea34f7b9b3

View file

@ -140,13 +140,6 @@ func (c *webSocketClient) Terminate(reason string) {
}
c.terminated = true
c.conn.Close()
go func() {
time.Sleep(5 * time.Second)
c.wgEvents.Wait()
close(c.events)
close(c.commands)
}()
}
func (c *webSocketClient) Terminated() bool {