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:
parent
22a48cd84f
commit
a971c561d1
1 changed files with 5 additions and 1 deletions
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue