1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-11-25 05:22:06 +01:00

Log if not all reader/writer threads where terminated

This commit is contained in:
Florian Schmaus 2019-02-08 13:08:51 +01:00
parent 62cba0d96f
commit 5c8e830157

View file

@ -652,6 +652,14 @@ public class XMPPTCPConnection extends AbstractXMPPConnection {
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);
// Start the writer thread. This will open an XMPP stream to the server
packetWriter.init();