mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-12-25 20:18:00 +01:00
[tcp] Set shutdownTimestamp before queue.shutdown()
In the writer thread, we use shutdownTimestamp to determine if we should break out of the writer loop. If we set shutdownTimestamp *after* queue.shutdown(), then there is a brief period where nextStreamElement() returns 'null' but done() still returns 'true'. Hence, we switch the logic "setting" those values.
This commit is contained in:
parent
9e5ac5a39a
commit
6e6a3ef88d
1 changed files with 1 additions and 1 deletions
|
@ -1305,8 +1305,8 @@ public class XMPPTCPConnection extends AbstractXMPPConnection {
|
|||
*/
|
||||
void shutdown(boolean instant) {
|
||||
instantShutdown = instant;
|
||||
queue.shutdown();
|
||||
shutdownTimestamp = System.currentTimeMillis();
|
||||
queue.shutdown();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue