mirror of
https://github.com/42wim/matterbridge
synced 2024-11-19 03:25:33 +00:00
Keep reconnecting until succeed (zulip) (#737)
This commit is contained in:
parent
96841c70c7
commit
740b5f2602
@ -116,11 +116,13 @@ func (b *Bzulip) handleQueue() error {
|
||||
case gzb.BadEventQueueError:
|
||||
b.Log.Info("got a bad event queue id error, reconnecting")
|
||||
b.bot.Queues = nil
|
||||
b.q, err = b.bot.RegisterAll()
|
||||
if err != nil {
|
||||
b.Log.Errorf("reconnecting failed: %s. Sleeping 10 seconds", err)
|
||||
time.Sleep(time.Second * 10)
|
||||
continue
|
||||
for {
|
||||
b.q, err = b.bot.RegisterAll()
|
||||
if err != nil {
|
||||
b.Log.Errorf("reconnecting failed: %s. Sleeping 10 seconds", err)
|
||||
time.Sleep(time.Second * 10)
|
||||
}
|
||||
break
|
||||
}
|
||||
case gzb.HeartbeatError:
|
||||
b.Log.Debug("heartbeat received.")
|
||||
|
Loading…
Reference in New Issue
Block a user