mirror of
https://github.com/cirruslabs/orchard.git
synced 2026-10-04 05:51:25 +02:00
Stop endpoints before host processes
This commit is contained in:
@@ -124,9 +124,9 @@ func (vm *VM) Start(eventStreamer *client.EventStreamer) {
|
||||
}
|
||||
|
||||
func (vm *VM) Suspend() <-chan error {
|
||||
vm.EndpointSet().Stop()
|
||||
vm.HostProcessSet().Stop()
|
||||
|
||||
vm.EndpointSet().Stop()
|
||||
errChan := make(chan error, 1)
|
||||
|
||||
errChan <- nil
|
||||
@@ -141,9 +141,9 @@ func (vm *VM) IP(ctx context.Context) (string, error) {
|
||||
}
|
||||
|
||||
func (vm *VM) Stop() <-chan error {
|
||||
vm.EndpointSet().Stop()
|
||||
vm.HostProcessSet().Stop()
|
||||
|
||||
vm.EndpointSet().Stop()
|
||||
errChan := make(chan error, 1)
|
||||
|
||||
errChan <- nil
|
||||
|
||||
@@ -433,9 +433,9 @@ func (vm *VM) IP(ctx context.Context) (string, error) {
|
||||
}
|
||||
|
||||
func (vm *VM) Suspend() <-chan error {
|
||||
vm.EndpointSet().Stop()
|
||||
vm.HostProcessSet().Stop()
|
||||
|
||||
vm.EndpointSet().Stop()
|
||||
errCh := make(chan error, 1)
|
||||
|
||||
select {
|
||||
@@ -468,9 +468,9 @@ func (vm *VM) Suspend() <-chan error {
|
||||
}
|
||||
|
||||
func (vm *VM) Stop() <-chan error {
|
||||
vm.EndpointSet().Stop()
|
||||
vm.HostProcessSet().Stop()
|
||||
|
||||
vm.EndpointSet().Stop()
|
||||
vm.stopMtx.Lock()
|
||||
defer vm.stopMtx.Unlock()
|
||||
if vm.stopDone != nil {
|
||||
|
||||
Reference in New Issue
Block a user