Close receiving of stanzas if io.EOF is received.

This commit is contained in:
Martin Dosch 2024-04-02 17:05:24 +02:00
parent 09e2423da4
commit c392eeb858
No known key found for this signature in database
GPG Key ID: 52A57CFCE13D657D

View File

@ -47,8 +47,12 @@ func getIQ(id string, c chan xmpp.IQ, iqc chan xmpp.IQ) {
func rcvStanzas(client *xmpp.Client, iqc chan xmpp.IQ, msgc chan xmpp.Chat) {
for {
received, err := client.Recv()
if err != nil && err != io.EOF {
closeAndExit(client, err)
if err != nil {
if err != io.EOF {
closeAndExit(client, err)
return
}
return
}
switch v := received.(type) {
case xmpp.Chat: