Skip to content

Bug in conn.close() #55

@xxgreg

Description

@xxgreg

Will throw null error, if sending terminate message throws.

Future flushing;
try {
  var msg = new MessageBuffer();
  msg.addByte(_MSG_TERMINATE);
  msg.addInt32(0);
  msg.setLength();
  _socket.add(msg.buffer);
  flushing = _socket.flush();
} on Exception catch (e, st) {
  _messages.add(new ClientMessageImpl(
      severity: 'WARNING',
      message: 'Exception while closing connection. Closed without sending '
        'terminate message.',
      connectionName: _getDebugName(),
      exception: e,
      stackTrace: st));
}

// Wait for socket flush to succeed or fail before closing the connection.
flushing.whenComplete(_destroy);

Null exception at "flushing.".

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions