[
https://issues.apache.org/jira/browse/TINKERPOP-2358?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17356445#comment-17356445
]
ASF GitHub Bot commented on TINKERPOP-2358:
-------------------------------------------
FlorianHockmann opened a new pull request #1425:
URL: https://github.com/apache/tinkerpop/pull/1425
https://issues.apache.org/jira/browse/TINKERPOP-2358
If the `ConnectionPool` was disposed while it was in parallel creating new
connections (e.g., to replace closed connections), those
connections could be leaked. `Dispose()` could not dispose them yet as they
were not completely established so they could be added to the pool.
We now check after creating new connections whether the pool has been
disposed in the meantime and then dispose these connections directly again.
In addition to that, the pool now also has a `CancellationTokenSource` which
allows us to cancel all active creations of new connections in `Dispose()`. So
we don't have to wait until they are created only so we can then dispose them
if we can already cancel the connection establishment.
VOTE +1
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> Potential connection leak on client disposing
> ---------------------------------------------
>
> Key: TINKERPOP-2358
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2358
> Project: TinkerPop
> Issue Type: Bug
> Components: dotnet
> Affects Versions: 3.4.6
> Reporter: Dzmitry L
> Assignee: Florian Hockmann
> Priority: Minor
>
> Potential issue may happen if you decide to call "Dispose" on a client while
> "PopulatePoolAsync" is active. "Dispose" closes all connections from the
> pool, but does not stop "PopulatePoolAsync". So after "PopulatePoolAsync"
> finish you will have unclosed connections.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)