mirror of
https://github.com/moby/moby.git
synced 2026-08-04 23:21:00 +00:00
Merge pull request #1001 from LK4D4/dbus_conn
Close dbus connection if firewalld is not started
This commit is contained in:
@@ -44,11 +44,15 @@ func FirewalldInit() error {
|
||||
if connection, err = newConnection(); err != nil {
|
||||
return fmt.Errorf("Failed to connect to D-Bus system bus: %v", err)
|
||||
}
|
||||
firewalldRunning = checkRunning()
|
||||
if !firewalldRunning {
|
||||
connection.sysconn.Close()
|
||||
connection = nil
|
||||
}
|
||||
if connection != nil {
|
||||
go signalHandler()
|
||||
}
|
||||
|
||||
firewalldRunning = checkRunning()
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user