Skip to content

Commit bd2e60d

Browse files
Ignore NotSupportedException thrown by BufferedStream writes
The issue seems to be an unfortunate buffered stream behaviour aspect when there's data to read and a write is attempted. Since this exception is very confusing and our intent is to shut down anyway, we ignore it.
1 parent 255bc36 commit bd2e60d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -485,6 +485,11 @@ public void Close(ShutdownEventArgs reason, bool abort, int timeout)
485485
if (!abort)
486486
throw ace;
487487
}
488+
catch (NotSupportedException nse)
489+
{
490+
// buffered stream had unread data in it and Flush()
491+
// was called, ignore to not confuse the user
492+
}
488493
catch (IOException ioe)
489494
{
490495
if (m_model0.CloseReason == null)

0 commit comments

Comments
 (0)