close method
Closes all connections in the pool
Implementation
Future<void> close() async {
_isClosed = true;
// Close all available connections
while (_availableConnections.isNotEmpty) {
final conn = _availableConnections.removeFirst();
await conn.close();
}
// Close all active connections
for (final conn in _activeConnections) {
await conn.close();
}
_activeConnections.clear();
}