From 27f8f9092fa3a1699153189271e06b5ae60f93dc Mon Sep 17 00:00:00 2001 From: Bryan Boreham Date: Fri, 29 May 2020 09:08:36 +0000 Subject: [PATCH] router: tell goroutine to exit when forwarder is stopped Otherwise a goroutine is leaked each time a connection is closed. --- router/overlay_switch.go | 1 + 1 file changed, 1 insertion(+) diff --git a/router/overlay_switch.go b/router/overlay_switch.go index 7fcd564d1f..b99d621aec 100644 --- a/router/overlay_switch.go +++ b/router/overlay_switch.go @@ -452,6 +452,7 @@ func (fwd *overlaySwitchForwarder) Stop() { fwd.lock.Lock() defer fwd.lock.Unlock() fwd.stopFrom(0) + close(fwd.stopChan) } func (fwd *overlaySwitchForwarder) ControlMessage(tag byte, msg []byte) {