Commit 25ff7a68 authored by Savorboard's avatar Savorboard

dispose resource when connection pool is full

parent 815e16f5
......@@ -53,7 +53,9 @@ namespace DotNetCore.CAP.RabbitMQ
}
finally
{
_connectionChannelPool.Return(channel);
var returned = _connectionChannelPool.Return(channel);
if (!returned)
channel.Dispose();
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment