File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
internal/app/master/inspectors/container Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -271,6 +271,7 @@ func (i *Inspector) RunContainer() error {
271271
272272 if devent .ID == i .ContainerID {
273273 if devent .Status == "die" {
274+ //TODO: update the docker client library to get the exit status to know if it really crashed
274275 if i .PrintState {
275276 fmt .Printf ("%s info=container status=crashed id=%v\n " , i .PrintPrefix , i .ContainerID )
276277 }
@@ -437,8 +438,6 @@ func (i *Inspector) showContainerLogs() {
437438
438439// ShutdownContainer terminates the container inspector instance execution
439440func (i * Inspector ) ShutdownContainer () error {
440- close (i .dockerEventStopCh )
441-
442441 i .shutdownContainerChannels ()
443442
444443 if i .ShowContainerLogs {
@@ -470,6 +469,9 @@ func (i *Inspector) ShutdownContainer() error {
470469
471470// FinishMonitoring ends the target container monitoring activities
472471func (i * Inspector ) FinishMonitoring () {
472+ close (i .dockerEventStopCh )
473+ i .dockerEventStopCh = nil
474+
473475 cmdResponse , err := ipc .SendContainerCmd (& command.StopMonitor {})
474476 errutils .WarnOn (err )
475477 //_ = cmdResponse
You can’t perform that action at this time.
0 commit comments