Previously, if the shutdown occurred in the middle of creating a connection to the missing shard in HostConnection, there was no way to close that connection, resulting in the driver hanging for >3 minutes.
This PR introduces a new field in the HostConnection class - _pending_connections - to keep track of connections that are in the middle of being created, along with a mechanism to close these connections if shutdown was executed.
Previously, if the shutdown occurred in the middle of creating a connection to the missing shard in
HostConnection
, there was no way to close that connection, resulting in the driver hanging for >3 minutes.This PR introduces a new field in the
HostConnection
class -_pending_connections
- to keep track of connections that are in the middle of being created, along with a mechanism to close these connections if shutdown was executed.Fixes: #262 (this reproducer - https://github.com/kbr-scylla/scylladb/commits/test-pause - doesn’t reproduce with that fix)