parent
d51cda6e5a
commit
71ede90b56
1 changed files with 7 additions and 0 deletions
7
wsapi.go
7
wsapi.go
|
@ -709,6 +709,13 @@ func (s *Session) reconnect() {
|
|||
return
|
||||
}
|
||||
|
||||
// Certain race conditions can call reconnect() twice. If this happens, we
|
||||
// just break out of the reconnect loop
|
||||
if err == ErrWSAlreadyOpen {
|
||||
s.log(LogInformational, "Websocket already exists, no need to reconnect")
|
||||
return
|
||||
}
|
||||
|
||||
s.log(LogError, "error reconnecting to gateway, %s", err)
|
||||
|
||||
<-time.After(wait * time.Second)
|
||||
|
|
Loading…
Reference in a new issue