[zeromq-dev] Reconnect REQ socket with REQ_RELAXED option

Alexey Melnichuk mimir at newmail.ru
Tue Jan 21 09:19:06 CET 2014


Server ROUTER socket (e.g. basic echo server)
Client REQ socket with REQ_RELAXED and REQ_CORRELATE.

1) Server and client starts.
2) Client send request and recv response.
3) Server stops
4) Client send request and get error EAGAIN on recv
5) Client get error EAGAIN on send
6) Server starts
7) Client continue gets error EAGAIN on send

I have test case[1] but it written on Lua.
And this is output[2] on travis-ci for this test.
Some times this test pass but it is very rare.
If I use DEALER socket on client side (i manually skip messages 
that not mutch to request) on client side all works.
If I do disconnect/connect on client socket after server 
restart then test also pass.

[1] https://github.com/moteus/lzmq/blob/master/test/test_req_relaxed.lua
[2] https://travis-ci.org/moteus/lzmq/jobs/17326042#L1591-L1620




More information about the zeromq-dev mailing list