Browse Source

dispose resource when connection pool is full

undefined
Savorboard 7 years ago
parent
commit
25ff7a688e
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      src/DotNetCore.CAP.RabbitMQ/PublishQueueExecutor.cs

+ 3
- 1
src/DotNetCore.CAP.RabbitMQ/PublishQueueExecutor.cs View File

@@ -53,7 +53,9 @@ namespace DotNetCore.CAP.RabbitMQ
} }
finally finally
{ {
_connectionChannelPool.Return(channel);
var returned = _connectionChannelPool.Return(channel);
if (!returned)
channel.Dispose();
} }
} }
} }

Loading…
Cancel
Save