mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-11-21 22:02:06 +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:
parent
c384849532
commit
63f133e68b
1 changed files with 2 additions and 2 deletions
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue