You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(related to Issue: #2053 - was intended to be merged before #2053 - this is why the 'Files changed' is only a change to documentation)
In SimplePool v1, a leaked-connection check (findAndCloseLeakedConnections() method) was done in both the borrow() and restore() methods of SimpleURIConnectionPool. In SimplePool v2, the leaked-connection check in restore() was removed. This check should be added back.
The findAndCloseLeakedConnections() method must also be moved to the start of borrow(). When at the end of the borrow() method, the connection leak check can be skipped due to borrow() exiting via an exception (which can be thrown by SimpleConnectionMaker.makeConnection() if connection-creation fails) before executing the leak check.
The SimpleConnectionState.borrow() method needs to remove the unused connectionCreateTimeout argument. Since this method is only used internally by SimpleURIConnectionPool, it is not a breaking change.
Also, some refactorings and documentation updates can be done to clarify the code. These refactorings are at the SimplePool internal implementation level, and so are not breaking changes.
Finally, to coincide with re-addition of connection leak checking in the restore() method, and the change in its placement in both borrow() and restore(), the connection leak checking mock test has been updated (specifically, the MockTimeoutLeakedConnection class has been updated) to provide more information on connection leak finding and fixing.
The text was updated successfully, but these errors were encountered:
PR: #2042
(related to Issue: #2053 - was intended to be merged before #2053 - this is why the 'Files changed' is only a change to documentation)
In SimplePool v1, a leaked-connection check (
findAndCloseLeakedConnections()
method) was done in both theborrow()
andrestore()
methods ofSimpleURIConnectionPool
. In SimplePool v2, the leaked-connection check inrestore()
was removed. This check should be added back.The
findAndCloseLeakedConnections()
method must also be moved to the start ofborrow()
. When at the end of theborrow()
method, the connection leak check can be skipped due toborrow()
exiting via an exception (which can be thrown bySimpleConnectionMaker.makeConnection()
if connection-creation fails) before executing the leak check.The
SimpleConnectionState.borrow()
method needs to remove the unusedconnectionCreateTimeout
argument. Since this method is only used internally bySimpleURIConnectionPool
, it is not a breaking change.Also, some refactorings and documentation updates can be done to clarify the code. These refactorings are at the SimplePool internal implementation level, and so are not breaking changes.
Finally, to coincide with re-addition of connection leak checking in the
restore()
method, and the change in its placement in bothborrow()
andrestore()
, the connection leak checking mock test has been updated (specifically, theMockTimeoutLeakedConnection
class has been updated) to provide more information on connection leak finding and fixing.The text was updated successfully, but these errors were encountered: