mirror of
https://github.com/linuxkit/linuxkit.git
synced 2026-01-06 04:13:59 +00:00
proxy: calling Close() on the Accept()ing fd won't cause it to return
This seems to be a difference between the AF_VSOCK and AF_INET implementations. We work around it by exiting the proxy process immediately, which will clean up resources anyway. Signed-off-by: David Scott <dave.scott@docker.com>
This commit is contained in:
@@ -67,6 +67,8 @@ func handleStopSignals(p libproxy.Proxy) {
|
||||
signal.Notify(s, os.Interrupt, syscall.SIGTERM, syscall.SIGSTOP)
|
||||
|
||||
for range s {
|
||||
p.Close()
|
||||
os.Exit(0)
|
||||
// The vsock proxy cannot be shutdown the same way as the TCP one:
|
||||
//p.Close()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user