-
Notifications
You must be signed in to change notification settings - Fork 304
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
Order of http_responses written not preserved after PSUBSCRIBE #158
Comments
|
Oh, that's a good find. I'll read about it but it feels like fixing this issue might require a substantial change. Sorry about the delay responding to this by the way, I have not worked on Webdis for a long time. |
So this is what I believe is happening:
To patch it up fast I changed the line:
to
inside of code for |
My application uses /PSUBSCRIBE and waits for notifications about keys. Redis generates hundreds of events about keys. Data that gets out of webdis to my application is "mixed" - first some http chunks are sent, then all of headers, then http chunks continues.
Fucntion
http_schedule_write
schedules write event for every http_response but libevent does not preserve order of calls tohttp_can_write
. In effect first are called callbacks that sends chunks, then headers, and then there are only chunks left. Similar situation might happen when a chunk would be too long to fit with one call to write inhttp_can_write
.The text was updated successfully, but these errors were encountered: