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

@ -134,6 +134,13 @@ func (l *link) create(msgIO linkInterfaceMsgIO, name, linkType, local, remote st
return &intf, nil
}
func (l *link) stop() error {
if err := l.tcp.stop(); err != nil {
return err
}
return nil
}
func (intf *linkInterface) handler() error {
// TODO split some of this into shorter functions, so it's easier to read, and for the FIXME duplicate peer issue mentioned later
myLinkPub, myLinkPriv := crypto.NewBoxKeys()