mirror of
https://github.com/yusing/godoxy.git
synced 2026-03-19 07:43:54 +01:00
fix(monitor): nil panic in DockerHealthMonitor
This commit is contained in:
@@ -40,6 +40,10 @@ func (mon *DockerHealthMonitor) Start(parent task.Parent) gperr.Error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
// zero port
|
||||
if mon.monitor.task == nil {
|
||||
return nil
|
||||
}
|
||||
mon.client.InterceptHTTPClient(mon.interceptInspectResponse)
|
||||
mon.monitor.task.OnFinished("close docker client", mon.client.Close)
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user