Closed pmorjan closed 5 years ago
Are you using Go 1.11.x? I haven't used this package myself in several months but I understand these changes were made to make integration with the runtime network poller possible.
/cc @aybabtme @mxpv
Hey. Right, Accept
is no longer blocking. Initially I did this changes because of https://github.com/mdlayher/vsock/issues/19
I think a correct approach of handling this would be check if returned error is temporary. Here is an example.
I understand the motivation for this PR. However I think it is worth mentioning that it's not only a bug fix as the title suggests. It now behaves differently to the net package. My fault not pointing that out earlier. Thanks.
I'm not closely following the work on integrating external types with the runtime network poller these days. I suspect that work would enable us to solve both use cases, because the runtime would allow the accept to block until a connection is received, and enable closing it later.
Fixed as of https://github.com/mdlayher/vsock/pull/26.
It seems that fda437ecbf04836c30bfb8c397ca7383c5d01a7e changed the behavior of the Accept method of vsock listeners. Accept is no longer a blocking operation. You can no longer simply loop on Accept() like in the example below. Accept always fails with EWOULDBLOCK. The demo in cmd/vcsp also fails. Is this intended? Thanks.