Makes sure we do not try to process incoming reply errors for xmpp ping packets.

deb-src-release-2.8.5426
Damian Minkov 11 years ago
parent 7ec39c1f49
commit d2da3d7773

@ -169,10 +169,14 @@ public void processPacket(Packet packet)
if(packet instanceof KeepAliveEvent)
{
// replay only to server pings, to avoid leak of presence
// skip if this is reply with error (like not supported)
// we can still receive errors, but as this is keep-alive ping
// we don't care for errors, as packets has already done its goal
KeepAliveEvent evt = (KeepAliveEvent)packet;
if(evt.getFrom() != null
&& evt.getFrom()
.equals(parentProvider.getAccountID().getService()))
.equals(parentProvider.getAccountID().getService())
&& evt.getError() == null)
{
parentProvider.getConnection().sendPacket(
IQ.createResultIQ(evt));

Loading…
Cancel
Save