mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2025-04-28 22:25:07 +03:00
Shut down listeners when stopping
This commit is contained in:
parent
b0df9e2f31
commit
b959f53fee
3 changed files with 16 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue