File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -177,7 +177,7 @@ class PoolImplementation<L> implements Pool<L> {
177177 Future <_PoolConnection > _selectOrCreate (
178178 Endpoint endpoint, ResolvedConnectionSettings settings) async {
179179 final oldc =
180- _connections.firstWhereOrNull ((c) => c._mayReuse (endpoint, settings) && c.isOpen );
180+ _connections.firstWhereOrNull ((c) => c._mayReuse (endpoint, settings));
181181 if (oldc != null ) {
182182 // NOTE: It is important to update the _isInUse flag here, otherwise
183183 // race conditions may create conflicts.
@@ -232,7 +232,7 @@ class _PoolConnection implements Connection {
232232 this ._pool, this ._endpoint, this ._connectionSettings, this ._connection);
233233
234234 bool _mayReuse (Endpoint endpoint, ResolvedConnectionSettings settings) {
235- if (_isInUse || endpoint != _endpoint || _isExpired ()) {
235+ if (_isInUse || endpoint != _endpoint || _isExpired () || ! isOpen ) {
236236 return false ;
237237 }
238238 if (! _connectionSettings.isMatchingConnection (settings)) {
You can’t perform that action at this time.
0 commit comments