mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-11-22 06:12:05 +01:00
Move lastStanzaReceived in processPacket
of AbstractXMPPConnection. In worst case we loose a timestamp because handleUnparsablePacket threw an Exception.
This commit is contained in:
parent
364fe12b38
commit
54706e3918
2 changed files with 1 additions and 5 deletions
|
@ -878,6 +878,7 @@ public abstract class AbstractXMPPConnection implements XMPPConnection {
|
||||||
* @param packet the packet to process.
|
* @param packet the packet to process.
|
||||||
*/
|
*/
|
||||||
protected void processPacket(Packet packet) {
|
protected void processPacket(Packet packet) {
|
||||||
|
lastStanzaReceived = System.currentTimeMillis();
|
||||||
// Deliver the incoming packet to listeners.
|
// Deliver the incoming packet to listeners.
|
||||||
executorService.submit(new ListenerNotification(packet));
|
executorService.submit(new ListenerNotification(packet));
|
||||||
}
|
}
|
||||||
|
@ -1270,10 +1271,6 @@ public abstract class AbstractXMPPConnection implements XMPPConnection {
|
||||||
return lastStanzaReceived;
|
return lastStanzaReceived;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void reportStanzaReceived() {
|
|
||||||
this.lastStanzaReceived = System.currentTimeMillis();
|
|
||||||
}
|
|
||||||
|
|
||||||
protected final void asyncGo(Runnable runnable) {
|
protected final void asyncGo(Runnable runnable) {
|
||||||
cachedExecutorService.execute(runnable);
|
cachedExecutorService.execute(runnable);
|
||||||
}
|
}
|
||||||
|
|
|
@ -996,7 +996,6 @@ public class XMPPTCPConnection extends AbstractXMPPConnection {
|
||||||
continue;
|
continue;
|
||||||
} finally {
|
} finally {
|
||||||
clientHandledStanzasCount = SMUtils.incrementHeight(clientHandledStanzasCount);
|
clientHandledStanzasCount = SMUtils.incrementHeight(clientHandledStanzasCount);
|
||||||
reportStanzaReceived();
|
|
||||||
}
|
}
|
||||||
processPacket(packet);
|
processPacket(packet);
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue