mirror of
https://salsa.debian.org/mdosch/go-sendxmpp
synced 2024-11-18 21:25:31 +00:00
Close receiving of stanzas if io.EOF is received.
This commit is contained in:
parent
09e2423da4
commit
c392eeb858
@ -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) {
|
func rcvStanzas(client *xmpp.Client, iqc chan xmpp.IQ, msgc chan xmpp.Chat) {
|
||||||
for {
|
for {
|
||||||
received, err := client.Recv()
|
received, err := client.Recv()
|
||||||
if err != nil && err != io.EOF {
|
if err != nil {
|
||||||
closeAndExit(client, err)
|
if err != io.EOF {
|
||||||
|
closeAndExit(client, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
return
|
||||||
}
|
}
|
||||||
switch v := received.(type) {
|
switch v := received.(type) {
|
||||||
case xmpp.Chat:
|
case xmpp.Chat:
|
||||||
|
Loading…
Reference in New Issue
Block a user