coreos/go-systemd

Why is this error "dbus: connection closed by user"

Mashiro707 opened this issue · 0 comments

I want to create a global connection.
image
so...i tried to use it but there was an error "dbus: connection closed by user"
simple code
err = gosys.NewSystemdConnection()
conn := gosys.GetSystemdConnection()
resChan := make(chan string)
unitID, err := conn.ReloadOrRestartUnitContext(ctx, target, "fail", resChan)
Can you tell me why?thanks~