Skip to content

Commit f28f585

Browse files
committed
Fix panic in stop when the VM goes away
Signed-off-by: Oleksandr Redko <[email protected]>
1 parent 463ed82 commit f28f585

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pkg/hostagent/events/watcher.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ loop:
4444
case <-ctx.Done():
4545
break loop
4646
case line := <-haStdoutTail.Lines:
47+
if line == nil {
48+
break loop
49+
}
4750
if line.Err != nil {
4851
logrus.Error(line.Err)
4952
}

0 commit comments

Comments
 (0)