Revert "Peer timer teardown"
This reverts commit d73f960aab.
Problems with deadlocking arises due to orphaned packets in per-peer
queues. Additional work on this issue continues in seperate branch.
This commit is contained in:
+12
-4
@@ -46,13 +46,21 @@ func (device *Device) RoutineTUNEventReader() {
|
||||
}
|
||||
|
||||
if event&TUNEventUp != 0 {
|
||||
logInfo.Println("Interface set up")
|
||||
device.Up()
|
||||
if !device.tun.isUp.Get() {
|
||||
// begin listening for incomming datagrams
|
||||
logInfo.Println("Interface set up")
|
||||
device.tun.isUp.Set(true)
|
||||
updateBind(device)
|
||||
}
|
||||
}
|
||||
|
||||
if event&TUNEventDown != 0 {
|
||||
logInfo.Println("Interface set down")
|
||||
device.Up()
|
||||
if device.tun.isUp.Get() {
|
||||
// stop listening for incomming datagrams
|
||||
logInfo.Println("Interface set down")
|
||||
device.tun.isUp.Set(false)
|
||||
closeBind(device)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user