don't hammer server if conn terminated during reconnection
This commit is contained in:
parent
73e444401d
commit
8399256730
3
irc.go
3
irc.go
@ -242,7 +242,8 @@ func (irc *Connection) Loop() {
|
|||||||
}
|
}
|
||||||
irc.Wait()
|
irc.Wait()
|
||||||
for !irc.isQuitting() {
|
for !irc.isQuitting() {
|
||||||
irc.Log.Printf("Error, disconnected: %s\n", err)
|
irc.Log.Printf("Error, disconnected: %s, 15s backoff\n", err)
|
||||||
|
time.Sleep(15 * time.Second)
|
||||||
if err = irc.Reconnect(); err != nil {
|
if err = irc.Reconnect(); err != nil {
|
||||||
irc.Log.Printf("Error while reconnecting: %s\n", err)
|
irc.Log.Printf("Error while reconnecting: %s\n", err)
|
||||||
time.Sleep(60 * time.Second)
|
time.Sleep(60 * time.Second)
|
||||||
|
Loading…
Reference in New Issue
Block a user