Browse Source

Fix rabbitmq connection may be reused when close forced. #533

master
Savorboard 4 years ago
parent
commit
f711d12abc
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      src/DotNetCore.CAP.RabbitMQ/IConnectionChannelPool.Default.cs

+ 1
- 1
src/DotNetCore.CAP.RabbitMQ/IConnectionChannelPool.Default.cs View File

@@ -143,7 +143,7 @@ namespace DotNetCore.CAP.RabbitMQ

public virtual bool Return(IModel connection)
{
if (Interlocked.Increment(ref _count) <= _maxSize)
if (Interlocked.Increment(ref _count) <= _maxSize && connection.IsOpen)
{
_pool.Enqueue(connection);



Loading…
Cancel
Save