diff options
Diffstat (limited to '')
-rw-r--r-- | service/ipc_server.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/service/ipc_server.go b/service/ipc_server.go index 4388bb00..3e4c7fd3 100644 --- a/service/ipc_server.go +++ b/service/ipc_server.go @@ -150,7 +150,7 @@ func IPCServerListen(reader *os.File, writer *os.File, events *os.File) error { return nil } -func notifyAll(notificationType NotificationType, iface interface{}) { +func notifyAll(notificationType NotificationType, ifaces ...interface{}) { if len(managerServices) == 0 { return } @@ -161,7 +161,7 @@ func notifyAll(notificationType NotificationType, iface interface{}) { if err != nil { return } - if iface != nil { + for _, iface := range ifaces { err = encoder.Encode(iface) if err != nil { return @@ -178,10 +178,10 @@ func notifyAll(notificationType NotificationType, iface interface{}) { managerServicesLock.RUnlock() } -func IPCServerNotifyTunnelChange(name string) { - notifyAll(TunnelChangeNotificationType, name) +func IPCServerNotifyTunnelChange(name string, state TunnelState) { + notifyAll(TunnelChangeNotificationType, name, state) } func IPCServerNotifyTunnelsChange() { - notifyAll(TunnelsChangeNotificationType, nil) + notifyAll(TunnelsChangeNotificationType) } |