mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-12-05 20:16:41 +00:00
Otherwise the underlying gets closed twice, once by the File's finalizer (which occurs at whichever point vsock appears no longer used) and another time by the syscall.Close(), which leads to EBADF. The various syscall.shutdown can also suffer from this if the File happens to get finalized first, but the reference in the defer'd function now keeps the File alive until we are truly done with the socket. This seems to resolve the random stalls and failures seen in "make test". Signed-off-by: Ian Campbell <ian.campbell@docker.com>
4.5 KiB
4.5 KiB