On Thu, 18 Oct 2012 12:11:06 +0900
Pieter Hintjens <[email protected]> wrote:

> On Thu, Oct 18, 2012 at 11:39 AM, Pieter Hintjens <[email protected]> wrote:
> 
> > Probably irrelevant, but setting identity on SUB and DEALER sockets is
> > meaningless.
> 
> Sorry, this was wrong... it's legal on DEALER but not on SUB.
> 
> -Pieter

The problem was related to setting identity on the DEALER.
Turns out than when the DEALER reconnects the internal ROUTER
code thinks the new socket is a duplicate of the old (still timing out)
socket and closes it.

Trace looks like:

DEALER       ->   ROUTER
       Syn ->
       <- Syn/Ack
       Ack ->

       Request -> [ID, data]
       <-ACK
       <- Response

==== DEALER crashes ===
       Syn ->
       <- Syn/Ack
       Ack ->

       Request -> [ID, data]
       <- Ack
       <- Fin
       Fin,Ack ->

The application was (mis)using IDENTITY as a form of session ID.
When client restarts it needs to be a new session.

This also explains why it would eventually clear out.
The ROUTER (server) would eventually do keepalive and detect dead old
socket.
_______________________________________________
zeromq-dev mailing list
[email protected]
http://lists.zeromq.org/mailman/listinfo/zeromq-dev

Reply via email to