- if stanza.GetHeader().Error != nil {
- Syslog_.Printf("XMPP Iq Error: %s", stanza.GetHeader().Error.Error())
- }
+ if stanza.Type == "error" || stanza.Error != nil {
+ Syslog_.Printf("XMPP %T Error: %s", stanza, stanza)
+ if handleStanzaError() { return }
+ continue
+ } else { error_count = 0 }
+
+ if HandleServerToClientPing(stanza, xmppout) {continue} //if true then routine handled it and we can continue
+ Debug_.Printf("Unhandled Iq: %s", stanza)