Skip to content

Commit

Permalink
twitter-archive#93 the session is closed when the channel is
Browse files Browse the repository at this point in the history
  • Loading branch information
krasa committed Apr 18, 2015
1 parent 494b6f0 commit eea933d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -708,6 +708,7 @@ public void fireChannelClosed() {
// do nothing -- ignore it
logger.debug("Unbind/close was requested, ignoring channelClosed event");
} else {
this.state.set(STATE_CLOSED);
this.sessionHandler.fireChannelUnexpectedlyClosed();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -730,8 +730,9 @@ public void remoteCloseDoesTriggerUnexpectedlyClosedEvent() throws Exception {
Thread.sleep(500);

Assert.assertEquals(1, sessionHandler.getClosedCount());
// DEFAULT handling is that we don't do anything special with this...
Assert.assertEquals(true, session.isBound());
// the session is closed when the channel is
Assert.assertEquals(false, session.isBound());
Assert.assertEquals(true, session.isClosed());

// unbind the session now -- this should work okay even though the channel is closed
session.unbind(100);
Expand Down

0 comments on commit eea933d

Please sign in to comment.