Update HadExceptions if socket not connected#184
Conversation
When ConnectTimeout != 0, it does not throw the exception, and HadExceptions it is not updated. Due to that, the connection is not disposed and the pool can not recover after a server crash
|
I'm not sure about this, it's only the way I think I can solve an issue I'm experiencing. Using a PooledRedisClientManager, with ConnectTimeOut != 0, when the server crashes, or it's restarted, the clients in the pool remain in a unstable state, since all the clientes are not disposed (since HadExceptions is not updated) What do you think about? Sorry. but I do not know the internals of the project |
|
Sorry, but I think that my issue is related to the DefaultIdleTimeOutSecs and the RedisNativeClient AssertConnectedSocket() method. If the the server is restarted, and this method is called before the IdleTimeOutSeconds, the socket is not connected but Reconnect() is not called, so it remains closed forever. The only one solution I see now for handling this issue, is to set the IdleTimeOutSeconds very close to 0. Thanks for your incredible work! |
|
I've just read #183 ! |
|
OK yeah sounds good for now. Can you approve the Contributor License Agreement so we can accept this, thx. |
|
Done! |
Update HadExceptions if socket not connected
|
Great, thx 👍 |
|
@mythz Can we get this in v3 as well? |
|
@jeffgabhart Sure, just as soon as someone sends a pull-req to the |
When ConnectTimeout != 0, it does not throw the exception, and
HadExceptions it is not updated. Due to that, the connection is not
disposed and the pool can not recover after a server crash