Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in conn.close() #55

Open
xxgreg opened this issue Dec 16, 2014 · 0 comments
Open

Bug in conn.close() #55

xxgreg opened this issue Dec 16, 2014 · 0 comments

Comments

@xxgreg
Copy link
Owner

xxgreg commented Dec 16, 2014

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.".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant