1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Merge pull request #1001 from LK4D4/dbus_conn

Close dbus connection if firewalld is not started
This commit is contained in:
Madhu Venugopal 2016-03-11 11:23:32 -08:00
commit 3c3e8834fb

View file

@ -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
}