code: protected synchronized void connectionFailed (final IOException ioe)
      {
          // make sure the socket isn't already closed down (meaning we've already dealt with the
          // failed connection)
          if (_channel == null) {
              return;
          }
  
          log.info("Connection failed", ioe);
  
          // let the client know that things went south
          notifyClientObservers(new ObserverOps.Client(_client) {
              @Override protected void notify (ClientObserver obs) {
                  obs.clientConnectionFailed(_client, ioe);
              }
          });
  
          // and request that we go through the motions of logging off
          logoff();
      }
docs: Callback called by the reader or writer thread when something goes awry with our socket
  connection to the server.