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

Close dbus connection if firewalld is not started

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
This commit is contained in:
Alexander Morozov 2016-03-09 09:31:22 -08:00
parent 22a48cd84f
commit a971c561d1

View file

@ -44,11 +44,15 @@ func FirewalldInit() error {
if connection, err = newConnection(); err != nil { if connection, err = newConnection(); err != nil {
return fmt.Errorf("Failed to connect to D-Bus system bus: %v", err) 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 { if connection != nil {
go signalHandler() go signalHandler()
} }
firewalldRunning = checkRunning()
return nil return nil
} }