You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If OptionRecvDeadline is set to a negative number on a sub socket (could apply to other protocols too, I did not test), calling the the Recv method will block until a data is received. According to the documentation, this should cause Recv to be a non-blocking operation.
The text was updated successfully, but these errors were encountered:
Its unusual to do this in Go, but it is a defect and not documented behavior.
Some of the protocols won't even let you set a negative deadline.
gdamore
changed the title
Setting OptionRecvDeadline to a negative number blocks Recv() forever
negative send/receive deadlines do not work
Sep 27, 2020
This actually affected pretty much all the protocols and both send
and receive deadlines. While here we've also made sure that
a non-blocking check will not fail if a message can immediately
be sent or received.
If OptionRecvDeadline is set to a negative number on a sub socket (could apply to other protocols too, I did not test), calling the the Recv method will block until a data is received. According to the documentation, this should cause Recv to be a non-blocking operation.
The text was updated successfully, but these errors were encountered: