Commit 815e16f5 authored by Savorboard's avatar Savorboard

fix the producer connection returned

parent 83aaab26
...@@ -53,7 +53,9 @@ namespace DotNetCore.CAP.Kafka ...@@ -53,7 +53,9 @@ namespace DotNetCore.CAP.Kafka
} }
finally finally
{ {
_connectionPool.Return(producer); var returned = _connectionPool.Return(producer);
if (!returned)
producer.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