• Martin Lucina's avatar
    Fix pgm_receiver.cpp: zmq_assert (pending_bytes == 0) (LIBZMQ-205) · c34a1443
    Martin Lucina authored
    This patch fixes the problem described in LIBZMQ-205. The assertion itself
    is probably caused by previously queued POLLIN events arriving after POLLIN
    has been disabled on the socket.
    
    The following additional bugs have been fixed as part of debugging this
    problem:
    
    - pgm_receiver_t does not flush messages written to the session in all
      cases which can lead to a stalled reader. Add calls to session->flush ()
      in the appropriate places.
    
    - ensure to restart polling when a pending message is flushed in
      activate_in ().
    Signed-off-by: 's avatarMartin Lucina <martin@lucina.net>
    c34a1443
pgm_receiver.cpp 7.61 KB