You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a connection is interrupted, the ping thread marks the RedisHost as unavailable. But, when the connection is restored, it does not update the Available property. It seems that the AsyncTcpClient recovers itself, marking the client as Connected, but the Available property is not updated.
Note that the TcpClient will have the IsConnected property as true, but the Available property will remain as false
I think the cause is the parallel Ping from ReadHosts and WriteHosts.
Both will call Connect method, but one that fails may flag the mConnected field as false, while the second thread has set as true.
When a connection is interrupted, the
ping
thread marks the RedisHost as unavailable. But, when the connection is restored, it does not update the Available property. It seems that the AsyncTcpClient recovers itself, marking the client as Connected, but the Available property is not updated.Note that the TcpClient will have the IsConnected property as
true
, but the Available property will remain asfalse
BeetleX.Redis/src/RedisHost.cs
Lines 94 to 126 in df7fcaf
Steps to reproduce:
Available = false
redis server is not available
The AsyncTcpClient changes to a Connected state, but the Available property is still false.
Changing the property before returning solved the issue for me:
The text was updated successfully, but these errors were encountered: