@ -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 {
return
}
switch v := received.(type) {
case xmpp.Chat: