Better naming of bind helpers
This commit is contained in:
parent
b5ae42349c
commit
af464cff00
4 changed files with 11 additions and 10 deletions
|
|
@ -47,17 +47,19 @@ func (device *Device) RoutineTUNEventReader() {
|
|||
|
||||
if event&TUNEventUp != 0 {
|
||||
if !device.tun.isUp.Get() {
|
||||
// begin listening for incomming datagrams
|
||||
logInfo.Println("Interface set up")
|
||||
device.tun.isUp.Set(true)
|
||||
UpdateUDPListener(device)
|
||||
updateBind(device)
|
||||
}
|
||||
}
|
||||
|
||||
if event&TUNEventDown != 0 {
|
||||
if device.tun.isUp.Get() {
|
||||
// stop listening for incomming datagrams
|
||||
logInfo.Println("Interface set down")
|
||||
device.tun.isUp.Set(false)
|
||||
CloseUDPListener(device)
|
||||
closeBind(device)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue