|
|
|
@ -52,9 +52,7 @@ func rcvStanzas(client *xmpp.Client, iqc chan xmpp.IQ, msgc chan xmpp.Chat, ctx
|
|
|
|
|
case <-ctx.Done():
|
|
|
|
|
return
|
|
|
|
|
default:
|
|
|
|
|
mutex.Lock()
|
|
|
|
|
received, err = client.Recv()
|
|
|
|
|
mutex.Unlock()
|
|
|
|
|
}
|
|
|
|
|
// Don't print errors if the program is getting shut down,
|
|
|
|
|
// as the errors might be triggered from trying to read from
|
|
|
|
@ -64,7 +62,6 @@ func rcvStanzas(client *xmpp.Client, iqc chan xmpp.IQ, msgc chan xmpp.Chat, ctx
|
|
|
|
|
return
|
|
|
|
|
default:
|
|
|
|
|
if err != nil {
|
|
|
|
|
mutex.Unlock()
|
|
|
|
|
closeAndExit(client, cancel, err)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|