Self-Ping IQ to unconnected IRC server yields `cancel:remote-server-not-found`
TL;DR: Change the catch (const IRCNotConnected& ex)
response in all three places from remote-server-not-found
to recipient-unavailable
.
My client is joined to an IRC channel via the bridge. Then, all of a sudden, the IRC server disconnects the bridge by force majeure:
2020-04-07_21:31:49.04335 [DEBUG]: src/irc/irc_client.cpp:365: IRC RECEIVING: (ircnet) IrcMessage[ERROR]{Closing Link: Ge0rG[~georg@xmpp.yaxim.org] (Ping timeout)}
2020-04-07_21:31:49.04430 [DEBUG]: src/xmpp/xmpp_component.cpp:77: XMPP SENDING:
<presence from='#channel%ircnet@irc.yax.im/Ge0rG' to='georg@yax.im/poezio-IS8H' type='unavailable'>
<status>Closing Link: Ge0rG[~georg@xmpp.yaxim.org] (Ping timeout)</status>
<x xmlns='http://jabber.org/protocol/muc#user'><status code='110'/><status code='332'/><item affiliation='none' role='participant'/></x>
</presence>
2020-04-07_21:31:49.04534 [DEBUG]: src/xmpp/xmpp_component.cpp:77: XMPP SENDING:
<presence from='#channel%ircnet@irc.yax.im/Ge0rG' to='georg@yax.im/yaxim' type='unavailable'>
<status>Closing Link: Ge0rG[~georg@xmpp.yaxim.org] (Ping timeout)</status>
<x xmlns='http://jabber.org/protocol/muc#user'><status code='110'/><status code='332'/><item affiliation='none' role='participant'/></x>
</presence>
Now, due to strange effects that are probably related to an incorrect callback implementation in yaxim, the latter doesn't realize that it got just kicked. While this is an implementation bug in yaxim, the same result could still occur when biboumi is running on a remote server and the presence-unavailable gets dropped in an s2s interruption.
This means that it still attempts to self-ping every now and then:
2020-04-07_21:35:19.53399 [DEBUG]: src/xmpp/xmpp_component.cpp:162: XMPP RECEIVING:
<iq from='georg@yax.im/yaxim' id='mSFMU-20481' to='#channel%ircnet@irc.yax.im/Ge0rG' type='get' xmlns='jabber:component:accept'><ping xmlns='urn:xmpp:ping'/></iq>
2020-04-07_21:35:19.53421 [DEBUG]: src/xmpp/xmpp_component.cpp:77: XMPP SENDING:
<iq from='#channel%ircnet@irc.yax.im/Ge0rG' id='mSFMU-20481' to='georg@yax.im/yaxim' type='error'>
<error type='cancel'><remote-server-not-found xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
<text xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'>Not connected to IRC server ircnet</text></error>
</iq>
Now according to XEP-0410 this response means:
- Error (
<remote-server-not-found>
or<remote-server-timeout>
): the remote server is unreachable for unspecified reasons; this can be a temporary network failure or a server outage. No decision can be made based on this; Treat like a timeout (see below).
This is based on the assumption that remote-server-not-found
is sent by the user's server when it can't reach a remote MUC server and where the s2s connectivity will be restored eventually.
Therefore, yaxim doesn't realize that it's not in the channel and doesn't try to rejoin.
Therefore, I would suggest changing the error response when the component is not connected to an IRC server to recipient-unavailable
.