Shut down listeners when stopping

This commit is contained in:
Neil Alexander 2019-09-18 16:32:22 +01:00
parent b0df9e2f31
commit b959f53fee
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944
3 changed files with 16 additions and 0 deletions

View file

@ -96,6 +96,13 @@ func (t *tcp) init(l *link) error {
return nil
}
func (t *tcp) stop() error {
for _, listener := range t.listeners {
close(listener.Stop)
}
return nil
}
func (t *tcp) reconfigure() {
t.link.core.config.Mutex.RLock()
added := util.Difference(t.link.core.config.Current.Listen, t.link.core.config.Previous.Listen)