anchor.diff:        _socket
         .transform(new RawFrameParser(tuningSettings).transformer)
         .transform(new AmqpMessageDecoder().transformer)
  -      .listen(_handleMessage, onError : _handleException, onDone : _onSocketClosed);
  +      .listen(
  +          _handleMessage,
  +          onError : _handleException,
  +          onDone : () => _handleException(new SocketException("Socket closed"))
  +      );
   
         // Allocate channel 0 for handshaking and transmit the AMQP header to bootstrap the handshake
         _channels.clear();
  
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:         .reversed
          .forEach((_ChannelImpl channel) => channel.handleException(ex));
  
          close();
          break;
        case ChannelException:
        // Forward to the appropriate channel and remove it from our list
  