mirror of
https://github.com/hanzoai/visor.git
synced 2026-10-30 14:46:33 +00:00
Fix a deadlock during container restore when snapshots contain connected TCP endpoints along with listening sockets. Previously, `closeEndpointAtRestore()` synchronously waited on `listenLoading` and `connectedLoading`, which blocked the sequential restore loop and created a circular wait with the listening socket initialization. A terminating socket does not bind ports or send network traffic, it has no dependency on whether other connected or listening sockets have finished initializing. This change removes the blocking waits from `closeEndpointAtRestore()` and adds regression tests in `TestRestoreListenWithPreexistingConnection`. PiperOrigin-RevId: 971362919