Closed gardenia closed 6 years ago
Actually replying with IQ error is enough for the server to learn that the client connection is alive, why do we need special processing of iq pings? Can you clarify please, because this requires more code than probably needed.
my main motivation was that the the client (rtb) gets a lot of verbose output about the unhandled IQ request and it was obscuring other things of interest in the output (see below).
if you think it is not legitimate to trap / respond to the ping then fair enough. I just find it useful in my case.
12:05:34.416 [warning] Unsupported IQ request:
#iq{id = <<"10777045712281767860">>,type = get,lang = <<>>,
from = #jid{user = <<>>,server = <<"xmpp.mysite.com">>,resource = <<>>,
luser = <<>>,lserver = <<"xmpp.mysite.com">>,
lresource = <<>>},
to = #jid{user = <<"user46_at_loadtest.com">>,
server = <<"xmpp.mysite.com">>,resource = <<"rtb">>,
luser = <<"user46_at_loadtest.com">>,
lserver = <<"xmpp.mysite.com">>,lresource = <<"rtb">>},
sub_els = [#xmlel{name = <<"ping">>,
attrs = [{<<"xmlns">>,<<"urn:xmpp:ping">>}],
children = []}],
meta = #{}}
Ah, right, ok, I merge then.
if server is configured to send (server to client) pings then respond with a pong