anchor.diff:      }
     }
   
  -  Future _close() {
  -
  -    if (_socket == null) {
  -      return new Future.value();
  -    }
  -
  -    // Already shutting down
  -    if (_clientClosed != null) {
  -      return _clientClosed.future;
  -    }
  -
  -    // Close all channels in reverse order so we send a connection close message when we close channel 0
  -    _clientClosed = new Completer();
  -    Future.wait(
  -        _channels
  -        .values
  -        .toList()
  -        .reversed
  -        .map((_ChannelImpl channel) => channel.close())
  -    )
  -    .then((_) => _socket.flush())
  -    .then((_) => _socket.close())
  -    .then((_) {
  -      _socket.destroy();
  -      _socket = null;
  -      _connected = null;
  -      _clientClosed.complete();
  -    });
  -
  -    return _clientClosed.future;
  -  }
  -
     /**
      * Open a working connection to the server using [config.cqlVersion] and optionally select
      * keyspace [defaultKeyspace]. Returns a [Future] to be completed on a successful protocol handshake
  
positive.code:    * Check if a connection is currently in handshake state
     */
    bool get handshaking => _socket != null && _connected != null && !_connected.isCompleted;
  
    void _onSocketClosed() {
      // If we are still handshaking, it could be that the server disconnected us
      // due to a failed SASL auth atttempt. In this case we should trigger a connection
      // exception
      if (handshaking && _channels.containsKey(0) &&
      (_channels[0]._lastHandshakeMessage is ConnectionStartOk ||
      _channels[0]._lastHandshakeMessage is ConnectionSecureOk)
      ) {
        _handleException(new FatalException("Authentication failed"));
      } else {
        _handleException(new FatalException("Lost connection to the server"));
      }
    }
  
    void _handleMessage(DecodedMessage serverMessage) {
      try {
  
negative.code:   }
  
    void _handleException(ex) {
  
      // Ignore exceptions while shutting down
      if (_clientClosed != null) {
        return;
      }
  
      // If we are still handshaking, it could be that the server disconnected us
      // due to a failed SASL auth atttempt. In this case we should trigger a connection
      // exception
      if( ex is SocketException ){
        // Wrap the exception
        if (handshaking && _channels.containsKey(0) &&
        (_channels[0]._lastHandshakeMessage is ConnectionStartOk ||
        _channels[0]._lastHandshakeMessage is ConnectionSecureOk)
        ) {
          ex = new FatalException("Authentication failed");
        } else {
          ex = new FatalException("Lost connection to the server");
        }
      }
  
      connectionLogger.severe(ex);
  