mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-11-22 12:02:05 +01:00
Log if not all reader/writer threads where terminated
This commit is contained in:
parent
62cba0d96f
commit
5c8e830157
1 changed files with 8 additions and 0 deletions
|
@ -652,6 +652,14 @@ public class XMPPTCPConnection extends AbstractXMPPConnection {
|
||||||
packetReader = new PacketReader();
|
packetReader = new PacketReader();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int availableReaderWriterSemaphorePermits = readerWriterSemaphore.availablePermits();
|
||||||
|
if (availableReaderWriterSemaphorePermits < 2) {
|
||||||
|
Object[] logObjects = new Object[] {
|
||||||
|
this,
|
||||||
|
availableReaderWriterSemaphorePermits,
|
||||||
|
};
|
||||||
|
LOGGER.log(Level.FINE, "Not every reader/writer threads where terminated on connection re-initializtion of {0}. Available permits {1}", logObjects);
|
||||||
|
}
|
||||||
readerWriterSemaphore.acquire(2);
|
readerWriterSemaphore.acquire(2);
|
||||||
// Start the writer thread. This will open an XMPP stream to the server
|
// Start the writer thread. This will open an XMPP stream to the server
|
||||||
packetWriter.init();
|
packetWriter.init();
|
||||||
|
|
Loading…
Reference in a new issue