~craftyguy/dnsane

b716abf67f4fe28efe9dd431e56e0898483192cd — Clayton Craft 1 year, 5 months ago cf8102d master
netman: trigger reloading nameservers on NM_DEVICE_STATE_DISCONNECTED

Fixes a problem where this signal was previously ignored, e.g. when
disconnecting but still having other connections active/up, resulting in
the wrong set of nameservers being used.
1 files changed, 2 insertions(+), 0 deletions(-)

M internal/netman/netman.go
M internal/netman/netman.go => internal/netman/netman.go +2 -0
@@ 108,6 108,8 @@ func (n *NetMan) signalHandler(sig *dbus.Signal) {
		// sometimes connections enter this state while another "up" connection
		// exists, so make sure DNS is refreshed
		fallthrough
	case "NM_DEVICE_STATE_DISCONNECTED":
		fallthrough
	case "NM_DEVICE_STATE_UNAVAILABLE":
		select {
		case <-time.After(500 * time.Millisecond):