diff --git a/socket/net/client/connector.go b/socket/net/client/connector.go index d8b0b96..7d0fbfd 100644 --- a/socket/net/client/connector.go +++ b/socket/net/client/connector.go @@ -88,6 +88,9 @@ func (c *Connectors) logHeader() string { } func (c *Connectors) onDisconnected() { + close(c.readChan) + close(c.writeChan) + c.reconnectedChan <- nil onDisconnected := c.OnDisconnected diff --git a/socket/web/client/connector.go b/socket/web/client/connector.go index 6739426..edadcf1 100644 --- a/socket/web/client/connector.go +++ b/socket/web/client/connector.go @@ -125,6 +125,9 @@ func (c *Connectors) logHeader() string { } func (c *Connectors) onDisconnected() { + close(c.readChan) + close(c.writeChan) + c.reconnectedChan <- nil onDisconnected := c.OnDisconnected