diff options
Diffstat (limited to 'bridge/zulip/zulip.go')
-rw-r--r-- | bridge/zulip/zulip.go | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/bridge/zulip/zulip.go b/bridge/zulip/zulip.go index 89c3b059..77bb7e7e 100644 --- a/bridge/zulip/zulip.go +++ b/bridge/zulip/zulip.go @@ -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.") |