Merge pull request #2916 from thaJeztah/replace_deprecated_dbus

libcontainer/cgroups/systemd: replace use of deprecated dbus.New()
This commit is contained in:
Kir Kolyshkin
2021-04-20 11:01:55 -07:00
committed by GitHub
+2 -1
View File
@@ -2,6 +2,7 @@ package systemd
import (
"bufio"
"context"
"fmt"
"math"
"os"
@@ -298,7 +299,7 @@ func getDbusConnection(rootless bool) (*systemdDbus.Conn, error) {
if rootless {
connDbus, connErr = NewUserSystemdDbus()
} else {
connDbus, connErr = systemdDbus.New()
connDbus, connErr = systemdDbus.NewWithContext(context.TODO())
}
})
return connDbus, connErr