The svc resource should use the private system bus of course

I didn't realize there was a difference until I was debugging an issue
with the pkg resource, which also uses dbus!
This commit is contained in:
James Shubin
2016-02-22 19:44:10 -05:00
parent 0339d0caa8
commit 2dc3c62bbd

3
svc.go
View File

@@ -80,7 +80,8 @@ func (obj *SvcRes) Watch() {
}
defer conn.Close()
bus, err := dbus.SystemBus()
// if we share the bus with others, we will get each others messages!!
bus, err := SystemBusPrivateUsable() // don't share the bus connection!
if err != nil {
log.Fatal("Failed to connect to bus: ", err)
}