Don't try discover on multicast, don't block existing sessions on listen

This commit is contained in:
Asim Aslam
2019-09-04 15:55:37 +01:00
parent d559ce9da2
commit 407381912b
2 changed files with 11 additions and 5 deletions

View File

@@ -814,6 +814,14 @@ func (t *tun) Dial(channel string, opts ...DialOption) (Session, error) {
// set the dial timeout
c.timeout = options.Timeout
// don't bother with the song and dance below
// we're just going to assume things come online
// as and when.
if c.multicast {
return c, nil
}
// non multicast so we need to find the link
t.RLock()
for _, link := range t.links {
link.RLock()