Skip to content

Commit a392c0d

Browse files
committed
pkg/networks/usernet: Add fallback to SIGKILL
Signed-off-by: Norio Nomura <norio.nomura@gmail.com>
1 parent bf70f4d commit a392c0d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pkg/networks/usernet/recoincile.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,10 @@ func Stop(ctx context.Context, name string) error {
157157
break
158158
}
159159
if time.Since(startWaiting) > 5*time.Second {
160-
logrus.Infof("usernet network still running after 5 seconds")
160+
logrus.Infof("usernet network still running after 5 seconds. Attempting to forcibly kill")
161+
if err := osutil.SysKill(pid, osutil.SigKill); err != nil {
162+
logrus.Error(err)
163+
}
161164
break
162165
}
163166
time.Sleep(500 * time.Millisecond)

0 commit comments

Comments
 (0)