mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-11-22 14:22:05 +01:00
Do not wait for the closing stream element on instant shutdown
This commit is contained in:
parent
90a5e289f8
commit
a8429d45f6
1 changed files with 10 additions and 8 deletions
|
@ -484,14 +484,16 @@ public class XMPPTCPConnection extends AbstractXMPPConnection {
|
||||||
}
|
}
|
||||||
LOGGER.finer("PacketWriter has been shut down");
|
LOGGER.finer("PacketWriter has been shut down");
|
||||||
|
|
||||||
try {
|
if (!instant) {
|
||||||
// After we send the closing stream element, check if there was already a
|
try {
|
||||||
// closing stream element sent by the server or wait with a timeout for a
|
// After we send the closing stream element, check if there was already a
|
||||||
// closing stream element to be received from the server.
|
// closing stream element sent by the server or wait with a timeout for a
|
||||||
@SuppressWarnings("unused")
|
// closing stream element to be received from the server.
|
||||||
Exception res = closingStreamReceived.checkIfSuccessOrWait();
|
@SuppressWarnings("unused")
|
||||||
} catch (InterruptedException | NoResponseException e) {
|
Exception res = closingStreamReceived.checkIfSuccessOrWait();
|
||||||
LOGGER.log(Level.INFO, "Exception while waiting for closing stream element from the server " + this, e);
|
} catch (InterruptedException | NoResponseException e) {
|
||||||
|
LOGGER.log(Level.INFO, "Exception while waiting for closing stream element from the server " + this, e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (packetReader != null) {
|
if (packetReader != null) {
|
||||||
|
|
Loading…
Reference in a new issue