Fix issue with tests failing due to test-related race conditions.

This commit is contained in:
2025-11-25 17:10:44 +00:00
parent 32e88efd9a
commit 035b1cdd01
2 changed files with 18 additions and 4 deletions
+2 -1
View File
@@ -155,7 +155,8 @@ func (p *Publisher) Stop() {
// goroutines to exit cleanly. This works around a race condition in the
// grandcat/zeroconf library where recv4() can access ipv4conn after shutdown()
// sets it to nil. See: https://github.com/grandcat/zeroconf/issues/95
const shutdownSettleTime = 50 * time.Millisecond
// Note: 100ms is needed for CI environments where timing can be more variable.
const shutdownSettleTime = 100 * time.Millisecond
// shutdownWithTimeout attempts to shutdown a zeroconf server with a timeout.
// If shutdown hangs, it logs a warning and returns anyway.