Remove writerException in XMPPTCPConnection

This delay mechanism is no longer necessary.
This commit is contained in:
Florian Schmaus 2020-06-17 20:31:28 +02:00
parent a05b464032
commit 884ee327e1
1 changed files with 1 additions and 6 deletions

View File

@ -1272,7 +1272,6 @@ public class XMPPTCPConnection extends AbstractXMPPConnection {
} }
private void writePackets() { private void writePackets() {
Exception writerException = null;
try { try {
// Write out packets from the queue. // Write out packets from the queue.
while (!done()) { while (!done()) {
@ -1382,15 +1381,11 @@ public class XMPPTCPConnection extends AbstractXMPPConnection {
// The exception can be ignored if the the connection is 'done' // The exception can be ignored if the the connection is 'done'
// or if the it was caused because the socket got closed // or if the it was caused because the socket got closed
if (!(done() || queue.isShutdown())) { if (!(done() || queue.isShutdown())) {
writerException = e; notifyConnectionError(e);
} else { } else {
LOGGER.log(Level.FINE, "Ignoring Exception in writePackets()", e); LOGGER.log(Level.FINE, "Ignoring Exception in writePackets()", e);
} }
} }
// Delay notifyConnectionError after shutdownDone has been reported in the finally block.
if (writerException != null) {
notifyConnectionError(writerException);
}
} }
private void drainWriterQueueToUnacknowledgedStanzas() { private void drainWriterQueueToUnacknowledgedStanzas() {