Skip to content

Commit

Permalink
WS fix
Browse files Browse the repository at this point in the history
  • Loading branch information
William Drai committed Apr 9, 2015
1 parent 226e591 commit 5cd2882
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,8 @@ public boolean runReceived(AsyncHttpContext asyncHttpContext) {
sendBytes(msg);
}
}

log.debug("Channel %s binary messages sent");

return true; // Messages were delivered, http context isn't valid anymore.
}
catch (IOException e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,10 @@ public void close(boolean timeout) {
log.debug("Channel %s close%s (was %s)", getId(), timeout ? " (timeout)" : "", session == null ? "(no session)" : (session.isOpen() ? "(open)" : "(not open)"));
if (session != null) {
try {
session.close(new CloseReason(CloseReason.CloseCodes.NORMAL_CLOSURE, timeout ? "Idle timeout" : "Channel closed"));
if (timeout)
session.close(new CloseReason(CloseReason.CloseCodes.GOING_AWAY, "Idle timeout"));
else
session.close(new CloseReason(CloseReason.CloseCodes.NORMAL_CLOSURE, "Channel closed"));
}
catch (Exception e) {
log.error(e, "Could not close channel %s", getId());
Expand Down

0 comments on commit 5cd2882

Please sign in to comment.