diff --git a/pkg/networks/usernet/recoincile.go b/pkg/networks/usernet/recoincile.go index c1329b7c1c1..ebc477ceaa6 100644 --- a/pkg/networks/usernet/recoincile.go +++ b/pkg/networks/usernet/recoincile.go @@ -143,7 +143,7 @@ func Stop(ctx context.Context, name string) error { return err } - if err := osutil.SysKill(pid, osutil.SigKill); err != nil { + if err := osutil.SysKill(pid, osutil.SigInt); err != nil { logrus.Error(err) return fmt.Errorf("failed to kill process with pid %d: %w", pid, err) } @@ -157,7 +157,10 @@ func Stop(ctx context.Context, name string) error { break } if time.Since(startWaiting) > 5*time.Second { - logrus.Infof("usernet network still running after 5 seconds") + logrus.Infof("usernet network still running after 5 seconds. Attempting to forcibly kill") + if err := osutil.SysKill(pid, osutil.SigKill); err != nil { + logrus.Error(err) + } break } time.Sleep(500 * time.Millisecond)