Skip to content

Commit

Permalink
Minimize diff slightly
Browse files Browse the repository at this point in the history
  • Loading branch information
Emile Joubert committed Nov 29, 2011
1 parent 150a5b0 commit 8e407c4
Showing 1 changed file with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -424,12 +424,13 @@ public void Abort(ushort reasonCode, string reasonText, int timeout)
///</remarks>
public void Close(ShutdownEventArgs reason, bool abort, int timeout)
{
bool reasonSet = SetCloseReason(reason);
if (!reasonSet && !abort)
throw new AlreadyClosedException(m_closeReason);

if (reasonSet)
{
if (!SetCloseReason(reason))
{
if (!abort)
throw new AlreadyClosedException(m_closeReason);
}
else
{
OnShutdown();
m_session0.SetSessionClosing(false);

Expand All @@ -452,7 +453,7 @@ public void Close(ShutdownEventArgs reason, bool abort, int timeout)
if (!abort)
throw ioe;
else
LogCloseError("Couldn't close connection cleanly. "
LogCloseError("Couldn't close connection cleanly. "
+ "Socket closed unexpectedly", ioe);
}
}
Expand Down

0 comments on commit 8e407c4

Please sign in to comment.