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

Redis streams implementations will indefinitely block if Redis server doesn't send a response #2219

Closed
johnrengelman opened this issue Jul 17, 2020 · 1 comment

Comments

@johnrengelman
Copy link

Expected behavior

The Redis stream commands such as xread return an error if the Redis server doesn't send a response of any kind. This can happen due to network or server errors (such as if the return path of a network connection is broken).

Actual behavior

Command blocks indefinitely.
This is a result of setting the client socket SOTimeout to infinite in this PR - #2059

Steps to reproduce:

Start a listening socket for Redis (eg nc -l 6379).
Connect and send a xread command.

Regardless of the block value, the command with hang indefinitely trying to read data from the socket.

Redis / Jedis Configuration

Jedis version:

3.3.0

Redis version:

5.0.9

Java version:

11

@sazzad16
Copy link
Collaborator

Hi @johnrengelman, could you please check if this issue resolved in Jedis 3.4.0 by setting infiniteSocketTimeout?

@sazzad16 sazzad16 closed this as completed Mar 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants