Browse code

daemon/libnetwork/osl: stop draining after LinkSubscribe timeout

The LinkSubscribe cleanup path is documented as bounded, but the timeout case only logged a warning and kept waiting for the update channel to close. If the subscription goroutine does not terminate, the deferred cleanup can still block forever after the warning.

Return from the drain loop after logging the timeout so waitForIfUpped can finish its bounded cleanup path.

Signed-off-by: Darafei Praliaskouski <me@komzpa.net>

Darafei Praliaskouski authored on 2026/05/27 05:42:04
Showing 1 changed files
... ...
@@ -455,6 +455,7 @@ func waitForIfUpped(ctx context.Context, ns netns.NsHandle, ifIndex int) (bool,
455 455
 				}
456 456
 			case <-drainTimerC:
457 457
 				log.G(ctx).Warn("timeout while waiting for LinkSubscribe to terminate")
458
+				return
458 459
 			}
459 460
 		}
460 461
 	}()