Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
When ConnectVSockSync fails in watchWakeupNotifications(), the returned net.Conn contains a nil value, but is not a nil interface (ie checking it for `== nil` returns false). This means we'll try to call `Close()` on the connection, which will cause a nil pointer dereference. See https://go.dev/doc/faq#nil_error and https://groups.google.com/g/golang-nuts/c/wnH302gBa4I for details about this behaviour. This bug is fixed by returning a nil interface when `vsockDevice.Connect(uint32(port))` returns an error.
- Loading branch information