docs: function removeConnection(conn) {
  
    this.emit('disconnect');
  
    conn.removeAllListeners('input');
    conn.removeAllListeners('output');
  
    // clean channel subscriptions
    if(conn.client.pubsub) {
      // must slice channels ref
      this._pubsub.unsubscribe(
        conn, conn.client.pubsub.channels.slice(0));
    }
  
    // clean pattern subscriptions
    // client.pubsub can be null after
    // removing channel subscriptions
    if(conn.client.pubsub) {
      // must slice patterns ref
      this._pubsub.punsubscribe(
        conn, conn.client.pubsub.patterns.slice(0));
    }
  
    var ind = this._conn.indexOf(conn);
    // remove the connection reference
    // the server disconnect listener is once
    // so we should always have a valid
    // index into the array
    this._conn.splice(ind, 1);
  }