router: tell goroutine to exit when forwarder is stopped

Otherwise a goroutine is leaked each time a connection is closed.
This commit is contained in:
Bryan Boreham committed 2020-06-04 17:46:18 +00:00
1 parent 9be65b466b
commit 27f8f9092f
1 file changed
+1
+1
View File
@@ -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) {