Skip to content

Commit 8d09341

Browse files
author
Matthias Radestock
committed
merge bug19190 into default
2 parents 0d3aa20 + 7d05ab0 commit 8d09341

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/client/impl/ConnectionBase.cs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -650,7 +650,7 @@ public void FinishClose()
650650
closed = true;
651651
m_heartbeatRead.Set();
652652
m_heartbeatWrite.Set();
653-
653+
654654
m_frameHandler.Close();
655655
m_model0.SetCloseReason(m_closeReason);
656656
m_model0.FinishClose();
@@ -684,10 +684,10 @@ public bool HardProtocolExceptionHandler(HardProtocolException hpe)
684684
///</remarks>
685685
public void ClosingLoop()
686686
{
687-
m_frameHandler.Timeout = ConnectionCloseTimeout;
688-
DateTime startTimeout = DateTime.Now;
689687
try
690688
{
689+
m_frameHandler.Timeout = ConnectionCloseTimeout;
690+
DateTime startTimeout = DateTime.Now;
691691
// Wait for response/socket closure or timeout
692692
while (!closed)
693693
{
@@ -699,6 +699,11 @@ public void ClosingLoop()
699699
MainLoopIteration();
700700
}
701701
}
702+
catch (ObjectDisposedException ode)
703+
{
704+
if (!closed)
705+
LogCloseError("Connection didn't close cleanly", ode);
706+
}
702707
catch (EndOfStreamException eose)
703708
{
704709
if (m_model0.CloseReason == null)

0 commit comments

Comments
 (0)