ctstone/csredis

Connection timeout

Closed this issue · 2 comments

I'm trying to use your library, but I'm getting a strange problem. After short period of time (couple minutes) executing RedisClient.publish throws RedisProtocolException Unexpected response type: -1 (expecting Int)

Publishing few messages works and then, when I let it sit for a few minutes, it seems to timeout the connection? Is there any reconnection logic in the driver? I didn't see any.

Hi Adam,

Unfortunately there is no retry logic as yet. Could you try sending a
Ping() command once a minute or so to keep the connection alive?

I'll look at implementing reconnect for a future release.

Chris

On Tue, Dec 17, 2013 at 6:08 PM, Adam Konrád notifications@github.comwrote:

I'm trying to use your library, but I'm getting a strange problem. After
short period of time (couple minutes) executing RedisClient.publishthrows
RedisProtocolException Unexpected response type: -1 (expecting Int)

Publishing few messages works and then, when I let it sit for a few
minutes, it seems to timeout the connection? Is there any reconnection
logic in the driver? I didn't see any.


Reply to this email directly or view it on GitHubhttps://github.com//issues/1
.

Reconnect is now implemented in the master branch