[client] let engine context unblock WaitStreamConnected

WaitStreamConnected only watched the signal client's own context, which
derives from the parent engineCtx rather than the engine's run context.
A Start blocked here (signal stream not yet up) could therefore not be
released by Engine.Stop, since Stop only cancels the engine's run
context.

Pass a context into WaitStreamConnected and select on it too, and have
the engine pass e.ctx, so Stop cancelling e.ctx unblocks a parked Start.
Update the Client interface, the mock, and callers accordingly.
This commit is contained in:
Zoltán Papp
2026-06-16 13:11:46 +02:00
parent c370c72d93
commit 002e0b036f
5 changed files with 9 additions and 7 deletions
+2 -1
View File
@@ -1776,7 +1776,8 @@ func (e *Engine) receiveSignalEvents() {
}
}()
e.signal.WaitStreamConnected()
// todo: consider to remove this blocker. I do not see benefit to block the Start operations
e.signal.WaitStreamConnected(e.ctx)
}
func (e *Engine) parseNATExternalIPMappings() []string {