1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2024-12-22 20:47:57 +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();