-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
REQ not sending ETIMEDOUT #93
Comments
Make sure the NN_RCVTIMEO option is set though!
|
Oh yeah, I've tried setting it to 1, nothing happened |
@thelinuxlich do you have a small test case we could add to our test suite to work against? |
Btw, ETIMEOUT does not apply to RAW sockets -- only to cooked ones. |
Huh. In my testing I'm getting EAGAIN instead of ETIMEDOUT. That's ... not what it should be. |
@gdamore , note we statically link an older version of Nanomsg. If that was recently fixed, we can update our dependency. |
Huh. In libnanomsg ETIMEDOUT is intentionally turned into EAGAIN: This feels like a mistake to me, but I need to make further research. Nonetheless, EAGAIN or ETIMEDOUT -- you do get a timeout. Blocking mode only of course. (nonblocking sockets cannot distinguish a "timeout" as such.) |
hmmm req.send is non-blocking in node-nanomsg? If it is we are lost concerning timeouts? :( |
@nickdesaulniers I'm trying to get the timeout event with this simple server implementation: https://gist.github.com/thelinuxlich/1e55ef121874d127ceca |
Well, you're missing a rep socket. Req/rep are meant to be used as a pair. I should add an example for this... |
for now, see this test |
no, I'm testing exactly the absence of a consumer listening to see a timeout event |
indeed, we do not emit a timeout event anywhere. Note the ability to specify socket options were added recently, and aren't fully tested other than check for their existence. See #52. What function in nanomsg returns ETIMEOUT or EAGAIN? That would help me figure out how to wire it up. |
Stack looks like nn_send -> nn_sendmsg -> nn_sock_send -> EAGAIN |
@gdamore said REQ is sending EAGAIN |
nn_recv gets the EAGAIN. Sent from my iPhone
|
According to @gdamore on nanomsg gitter channel:
So far I've tried every configuration possible and req.on("timeout", function() { ... }) never fires.
The text was updated successfully, but these errors were encountered: