lib/Connection.js
function(reason) {
      var t = this, socket = t.get('socket');
      t.connecting = false;
      t.connected = false;

      // Only disconnect once.
      // This method can be called many times during a disconnect (manually,
      // by socketIO disconnect, and/or by the underlying socket disconnect).
      if (t.socketEvents) {
        t.removeAllEvents();
        socket.disconnect();
        t.trigger('disconnect', reason);
        log.info(t.logId + 'disconnect', reason);
      }
    }
function(reason) {
      var t = this, socket = t.get('socket');
      t.connecting = false;
      t.connected = false;

      // Only disconnect once.
      // This method can be called many times during a disconnect (manually,
      // by socketIO disconnect, and/or by the underlying socket disconnect).
      if (t.socketEvents) {
        t.removeAllEvents();
        socket.disconnect();
        t.trigger('disconnect', reason);
        log.info(t.logId + 'disconnect', reason);
      }
    }
function ( reason ) { var t = this , socket = t . get ( 'socket' ) ; t . connecting = false ; t . connected = false ; // Only disconnect once. // This method can be called many times during a disconnect (manually, // by socketIO disconnect, and/or by the underlying socket disconnect). if ( t . socketEvents ) { t . removeAllEvents ( ) ; socket . disconnect ( ) ; t . trigger ( 'disconnect' , reason ) ; log . info ( t . logId + 'disconnect' , reason ) ; } }
Disconnect from the remote process

This can be called from the underlying transport if it detects a disconnect,
or it can be manually called to force a disconnect.

@method disconnect
@param reason {String} Reason for the disconnect
 
<strong>Disconnected from a remote monitor process</strong>

This event is emitted after the remote connection is disconnected and
resources released.

@event disconnect
@param reason {String} Reason for the disconnect
Disconnect from the remote process