MCPcopy Create free account
hub / github.com/encodeous/nylon / closeBindLocked

Function closeBindLocked

polyamide/device/device.go:444–455  ·  view source on GitHub ↗

closeBindLocked closes the device's net.bind. The caller must hold the net mutex.

(device *Device)

Source from the content-addressed store, hash-verified

442// closeBindLocked closes the device's net.bind.
443// The caller must hold the net mutex.
444func closeBindLocked(device *Device) error {
445 var err error
446 netc := &device.net
447 if netc.netlinkCancel != nil {
448 netc.netlinkCancel.Cancel()
449 }
450 if netc.bind != nil {
451 err = netc.bind.Close()
452 }
453 netc.stopping.Wait()
454 return err
455}
456
457func (device *Device) Bind() conn.Bind {
458 device.net.Lock()

Callers 2

BindUpdateMethod · 0.85
BindCloseMethod · 0.85

Calls 3

CloseMethod · 0.65
CancelMethod · 0.45
WaitMethod · 0.45

Tested by

no test coverage detected