Skip to content
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

Avoid terminating connections prematurely #1511

Merged
merged 1 commit into from
Aug 6, 2015

Commits on Aug 6, 2015

  1. Avoid terminating connections prematurely

    While sending very large messages (far beyond what fits in a the tcp
    buffer, so it takes multiple sendto system calls for it to finish),
    zmq_close will close the connection regardless of ZMQ_LINGER.
    
    In case no engine is attached, a pipe->check_read() is needed to look
    for the delimiter in the pipe and ultimately trigger the pipe
    termination.
    
    However, if there *is* an engine attached, the check_read() looks ahead
    and finds the delimiter and terminates the connection even though the
    engine might actually still be in the middle of sending a message.
    
    This happens because while the io_thread is still busy sending the data,
    the pipe can get terminated and the io thread ends up being terminated.
    sorenisanerd committed Aug 6, 2015
    Configuration menu
    Copy the full SHA
    abc845d View commit details
    Browse the repository at this point in the history