[tcp] Add code comment why we need to set "running = false" here

This commit is contained in:
Florian Schmaus 2021-03-14 17:51:33 +01:00
parent 9d1b88a877
commit f2b44f65d9
1 changed files with 2 additions and 1 deletions

View File

@ -1142,7 +1142,8 @@ public class XMPPTCPConnection extends AbstractXMPPConnection {
}
catch (Exception e) {
// Set running to false since this thread will exit here and notifyConnectionError() will wait until
// the reader and writer thread's 'running' value is false.
// the reader and writer thread's 'running' value is false. Hence we need to set it to false before calling
// notifyConnetctionError() below, even though run() also sets it to false. Therefore, do not remove this.
running = false;
String ignoreReasonThread = null;