Skip to content

Commit

Permalink
XMPPTCPConnection log when reader/writer threads start and exit
Browse files Browse the repository at this point in the history
  • Loading branch information
Flowdalic committed Mar 25, 2019
1 parent 007a04c commit 35f0aa9
Showing 1 changed file with 8 additions and 2 deletions.
Expand Up @@ -1074,16 +1074,19 @@ protected class PacketReader {
void init() {
done = false;

final String threadName = "Smack Reader (" + getConnectionCounter() + ')';
Async.go(new Runnable() {
@Override
public void run() {
LOGGER.finer(threadName + " start");
try {
parsePackets();
} finally {
LOGGER.finer(threadName + " exit");
XMPPTCPConnection.this.readerWriterSemaphore.release();
}
}
}, "Smack Reader (" + getConnectionCounter() + ")");
}, threadName);
}

/**
Expand Down Expand Up @@ -1378,16 +1381,19 @@ void init() {
}

queue.start();
final String threadName = "Smack Writer (" + getConnectionCounter() + ')';
Async.go(new Runnable() {
@Override
public void run() {
LOGGER.finer(threadName + " start");
try {
writePackets();
} finally {
LOGGER.finer(threadName + " exit");
XMPPTCPConnection.this.readerWriterSemaphore.release();
}
}
}, "Smack Writer (" + getConnectionCounter() + ")");
}, threadName);
}

private boolean done() {
Expand Down

0 comments on commit 35f0aa9

Please sign in to comment.