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