-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
Do not flush OutputStream to avoid contamination #998
Conversation
LGTM. Whenever another collaborator approves we should definitely merge. @itugs thanks for the thorough investigation. |
I've just try tcpdump and found there's some issue but I don't think about difference of BinaryJedisPubSub and JedisPubSub. |
Yes. Good catch! Lets merge it! |
@itugs did you run the tests before commiting?. Seems like something else broke because if this change |
@itugs BinaryJedisPubSub.proceed() and BinaryJedisPubSub.proceedWithPatterns() should execute flush() after calling psubscribe() / subscribe(). |
Oh, I'll follow that test failure. Sorry to bother you. |
I revised and |
No problem. We also know random test failures, and we re-run tests. |
OK, test failure issue is gone. |
Amazing! @HeartSaVioR. Can you merge? |
@marcosnils I'll merge it within 1 hour. :) |
Do not flush OutputStream to avoid contamination
Merged to master, 2.7, 2.8 respectively. Thanks for your amazing work! @itugs |
Thanks! I'm very exciting to be contributing to Jedis. |
Related with #997
BinaryJedisPubSub#process
useClient#getObjectMultiBulkReply
and it flush output stream before read from socket. This cause contamination of outputbuffer and redis close client connection due to Protocol Error. UsingClient#getRawObjectMultiBulkReply
will fix this.JedisPubSub
already use it. So if we change that test case withJedisPubSub
it do not fail.Maybe there was a missing.
Here is TCP dump log of test case provided #996