Skip to content

Commit 8e407c4

Browse files
author
Emile Joubert
committed
Minimize diff slightly
1 parent 150a5b0 commit 8e407c4

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

projects/client/RabbitMQ.Client/src/client/impl/ConnectionBase.cs

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -424,12 +424,13 @@ public void Abort(ushort reasonCode, string reasonText,
424424
///</remarks>
425425
public void Close(ShutdownEventArgs reason, bool abort, int timeout)
426426
{
427-
bool reasonSet = SetCloseReason(reason);
428-
if (!reasonSet && !abort)
429-
throw new AlreadyClosedException(m_closeReason);
430-
431-
if (reasonSet)
432-
{
427+
if (!SetCloseReason(reason))
428+
{
429+
if (!abort)
430+
throw new AlreadyClosedException(m_closeReason);
431+
}
432+
else
433+
{
433434
OnShutdown();
434435
m_session0.SetSessionClosing(false);
435436

@@ -452,7 +453,7 @@ public void Close(ShutdownEventArgs reason, bool abort, int timeout)
452453
if (!abort)
453454
throw ioe;
454455
else
455-
LogCloseError("Couldn't close connection cleanly. "
456+
LogCloseError("Couldn't close connection cleanly. "
456457
+ "Socket closed unexpectedly", ioe);
457458
}
458459
}

0 commit comments

Comments
 (0)