code: void handleCommunicationIssue(Exception io) {
          // If we are connecting or disconnecting, note exception and leave
          statusLock.lock();
          try {
              if (this.connecting || this.disconnecting || this.status == Status.CLOSED || this.isDraining()) {
                  this.exceptionDuringConnectChange = io;
                  return;
              }
          } finally {
              statusLock.unlock();
          }
  
          processException(io);
  
          // Spawn a thread so we don't have timing issues with
          // waiting on read/write threads
          executor.submit(() -> {
              try {
                  this.closeSocket(true);
              } catch (InterruptedException e) {
                  processException(e);
              }
          });
      }
docs: Called from reader/writer thread