Skip to content

Commit

Permalink
vm/vmm: properly shutdown output reading goroutine
Browse files Browse the repository at this point in the history
The goroutine sends on bootOutputStop to notify about its completion,
but the main goroutine is not receiving from the chan on success
and since the chan in unbuffered, the output reading goroutine
hangs on the send forever.
  • Loading branch information
dvyukov committed Sep 20, 2018
1 parent 3af0330 commit d108600
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions vm/vmm/vmm.go
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ func (inst *instance) Boot() error {
return vmimpl.BootError{Title: err.Error(), Output: bootOutput}
}
bootOutputStop <- true
<-bootOutputStop
return nil
}

Expand Down

0 comments on commit d108600

Please sign in to comment.