zeromq / zbroker

Elastic pipes
Mozilla Public License 2.0
50 stars 11 forks source link

Problem: can't close pipe in "expecting chunk" state #30

Closed hintjens closed 10 years ago

hintjens commented 10 years ago

Symptom: when doing a blocked read and EINTR occurs, the server state was stuck in expecting chunk, and would't accept a close command.

Duplicate of issue #26, I think.

rpedde commented 10 years ago

Same for "expecting data" state as well, a read with a writer connected but no writes yet is in expecting data and won't honor a close.

More accurately, sequence of events is:

open read pipe open write pipe read one byte from the read pipe with no timeout -- blocks send SIGALRM - read returns with EINTR subsequent close on the read pipe blocks indefinitely

hintjens commented 10 years ago

I need to refine the responses to a read then, so a close can return close-ok and the read can then return read-error.