We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7563713 commit bd45740Copy full SHA for bd45740
lib/src/pool/pool_impl.dart
@@ -177,7 +177,7 @@ class PoolImplementation<L> implements Pool<L> {
177
Future<_PoolConnection> _selectOrCreate(
178
Endpoint endpoint, ResolvedConnectionSettings settings) async {
179
final oldc =
180
- _connections.firstWhereOrNull((c) => c._mayReuse(endpoint, settings));
+ _connections.firstWhereOrNull((c) => c._mayReuse(endpoint, settings) && c.isOpen);
181
if (oldc != null) {
182
// NOTE: It is important to update the _isInUse flag here, otherwise
183
// race conditions may create conflicts.
0 commit comments