This PR fixes various tunnel race conditions
This commit is contained in:
@@ -854,16 +854,6 @@ func (t *tun) connect() error {
|
||||
}
|
||||
}()
|
||||
|
||||
// setup links
|
||||
t.setupLinks()
|
||||
|
||||
// process outbound messages to be sent
|
||||
// process sends to all links
|
||||
go t.process()
|
||||
|
||||
// monitor links
|
||||
go t.monitor()
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -889,6 +879,16 @@ func (t *tun) Connect() error {
|
||||
// create new close channel
|
||||
t.closed = make(chan bool)
|
||||
|
||||
// setup links
|
||||
t.setupLinks()
|
||||
|
||||
// process outbound messages to be sent
|
||||
// process sends to all links
|
||||
go t.process()
|
||||
|
||||
// monitor links
|
||||
go t.monitor()
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user