forked from jshiffer/matterbridge
Don't treat nil as an unknown type of error (zulip) (#2024)
Fixes #1869
This commit is contained in:
parent
5feafcddba
commit
6500714a93
@ -106,6 +106,7 @@ func (b *Bzulip) getChannel(id int) string {
|
|||||||
func (b *Bzulip) handleQueue() error {
|
func (b *Bzulip) handleQueue() error {
|
||||||
for {
|
for {
|
||||||
messages, err := b.q.GetEvents()
|
messages, err := b.q.GetEvents()
|
||||||
|
if err != nil {
|
||||||
switch err {
|
switch err {
|
||||||
case gzb.BackoffError:
|
case gzb.BackoffError:
|
||||||
time.Sleep(time.Second * 5)
|
time.Sleep(time.Second * 5)
|
||||||
@ -129,7 +130,7 @@ func (b *Bzulip) handleQueue() error {
|
|||||||
b.Log.Debugf("receiving error: %#v", err)
|
b.Log.Debugf("receiving error: %#v", err)
|
||||||
time.Sleep(time.Second * 10)
|
time.Sleep(time.Second * 10)
|
||||||
}
|
}
|
||||||
if err != nil {
|
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
for _, m := range messages {
|
for _, m := range messages {
|
||||||
|
Loading…
Reference in New Issue
Block a user