1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2024-11-22 06:12:05 +01:00

Set 'running' to true prior starting the reader/writer threads

To ensure the thread starting the reader/writer threads sees them
running and eventually waits until the 'running' boolean is reset to
'false' upon connection termination.
This commit is contained in:
Florian Schmaus 2020-06-17 21:55:24 +02:00
parent c384849532
commit 63f133e68b

View file

@ -912,11 +912,11 @@ public class XMPPTCPConnection extends AbstractXMPPConnection {
void init() {
done = false;
running = true;
Async.go(new Runnable() {
@Override
public void run() {
LOGGER.finer(threadName + " start");
running = true;
try {
parsePackets();
} finally {
@ -1184,11 +1184,11 @@ public class XMPPTCPConnection extends AbstractXMPPConnection {
}
queue.start();
running = true;
Async.go(new Runnable() {
@Override
public void run() {
LOGGER.finer(threadName + " start");
running = true;
try {
writePackets();
} finally {