Browse Source

fix the producer connection returned

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

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

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

Loading…
Cancel
Save