Open Nekmo opened 12 years ago
I'll have to think through this one carefully to be sure to get it right.
We have two issues at play here:
1) For backwards compatibility and convenience reasons, the send_ping()
method returns the ping delay instead of the Iq result (or raising IqError), unlike the convention for all other Iq based calls.
2) For pings between client and server, it doesn't matter time wise if there was an error: the time spent sending the error is the same as sending an actual ping. This allows pinging to work even with servers that don't support them.
What I'm thinking so far is to keep the current behaviour for the client to server case, but allow the exceptions to pass through in all other cases. And, in both cases, to continue returning the time difference.
If I send a ping request to a nonexistent JID, then I get the ping was sent successfully.
My Code:
Debug: