Fix error event unbinding
This commit is contained in:
parent
a968004d4e
commit
425d139b1c
|
@ -39,6 +39,7 @@ func (c *client) Connect() error {
|
||||||
c.conn = conn
|
c.conn = conn
|
||||||
|
|
||||||
err = conn.On(gosocketio.OnConnection, func(h *gosocketio.Channel) {
|
err = conn.On(gosocketio.OnConnection, func(h *gosocketio.Channel) {
|
||||||
|
conn.Off(gosocketio.OnError)
|
||||||
c.logf("connected with sid '%s'", h.Id())
|
c.logf("connected with sid '%s'", h.Id())
|
||||||
err = c.sendBrowserConnected()
|
err = c.sendBrowserConnected()
|
||||||
wg.Done()
|
wg.Done()
|
||||||
|
@ -59,8 +60,6 @@ func (c *client) Connect() error {
|
||||||
|
|
||||||
wg.Wait()
|
wg.Wait()
|
||||||
|
|
||||||
conn.On(gosocketio.OnError, nil)
|
|
||||||
|
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Reference in New Issue