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:
1 parent
9be65b466b
commit
27f8f9092f
1 file changed
+1
@@ -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) {
|
||||
|
||||
Reference in new issue
Block a user