Skip to content

Commit ce2f191

Browse files
Merge pull request #110 from rabbitmq/rabbitmq-dotnet-client-109
Don't leak recorded channels when automatic recovery is used
2 parents bb86c21 + 4d7acbf commit ce2f191

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -659,7 +659,13 @@ public void HandleConnectionUnblocked()
659659

660660
void IDisposable.Dispose()
661661
{
662-
Abort();
662+
try {
663+
Abort();
664+
}
665+
finally
666+
{
667+
m_models.Clear();
668+
}
663669
if (ShutdownReport.Count > 0)
664670
{
665671
foreach (ShutdownReportEntry entry in ShutdownReport)

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ public override string ToString()
372372

373373
void IDisposable.Dispose()
374374
{
375-
m_delegate.Close();
375+
Abort();
376376
}
377377

378378
public void ConnectionTuneOk(ushort channelMax,

0 commit comments

Comments
 (0)