mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-11-22 12:02:05 +01:00
Use single threaded ExecutorService
for PacketListeners. Fixes SMACK-583.
This commit is contained in:
parent
bd0ada480b
commit
cea79d1bb8
1 changed files with 6 additions and 1 deletions
|
@ -200,7 +200,12 @@ public abstract class XMPPConnection {
|
|||
|
||||
protected XMPPInputOutputStream compressionHandler;
|
||||
|
||||
private final ScheduledExecutorService executorService = new ScheduledThreadPoolExecutor(2,
|
||||
/**
|
||||
* ExecutorService used to invoke the PacketListeners on newly arrived and parsed stanzas. It is
|
||||
* important that we use a <b>single threaded ExecutorService</b> in order to guarantee that the
|
||||
* PacketListeners are invoked in the same order the stanzas arrived.
|
||||
*/
|
||||
private final ScheduledExecutorService executorService = new ScheduledThreadPoolExecutor(1,
|
||||
new SmackExecutorThreadFactory(connectionCounterValue));
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue