Stop endpoints before host processes

This commit is contained in:
Nikolay Edigaryev
2026-09-07 15:24:48 +01:00
parent d8caf2d33c
commit 9f3dd7da76
2 changed files with 4 additions and 4 deletions
@@ -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
+2 -2
View File
@@ -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 {