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:
parent
c384849532
commit
63f133e68b
1 changed files with 2 additions and 2 deletions
|
@ -912,11 +912,11 @@ public class XMPPTCPConnection extends AbstractXMPPConnection {
|
||||||
void init() {
|
void init() {
|
||||||
done = false;
|
done = false;
|
||||||
|
|
||||||
|
running = true;
|
||||||
Async.go(new Runnable() {
|
Async.go(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
LOGGER.finer(threadName + " start");
|
LOGGER.finer(threadName + " start");
|
||||||
running = true;
|
|
||||||
try {
|
try {
|
||||||
parsePackets();
|
parsePackets();
|
||||||
} finally {
|
} finally {
|
||||||
|
@ -1184,11 +1184,11 @@ public class XMPPTCPConnection extends AbstractXMPPConnection {
|
||||||
}
|
}
|
||||||
|
|
||||||
queue.start();
|
queue.start();
|
||||||
|
running = true;
|
||||||
Async.go(new Runnable() {
|
Async.go(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
LOGGER.finer(threadName + " start");
|
LOGGER.finer(threadName + " start");
|
||||||
running = true;
|
|
||||||
try {
|
try {
|
||||||
writePackets();
|
writePackets();
|
||||||
} finally {
|
} finally {
|
||||||
|
|
Loading…
Reference in a new issue