2881099 / csredis

.NET Core or .NET Framework 4.0+ client for Redis and Redis Sentinel (2.8) and Cluster. Includes both synchronous and asynchronous clients.
MIT License
2.01k stars 414 forks source link

同步方法与异步方法的重试机制存在差异 #473

Closed softworm closed 1 year ago

softworm commented 1 year ago

注意到 同步方法 public T Call<T>(RedisCommand<T> command) 中会尝试重新打开连接

但异步方法async public Task<T> CallAsync<T>(RedisCommand<T> command)没有此逻辑

这样导致当服务端主动关闭连接后在异步方法中不会产生重试效果,会直接抛出异常。

不知是否有意这样设计,或者存在某些难以处理的情况?

2881099 commented 1 year ago

欢迎切换到FreeRedis

softworm commented 1 year ago

老哥稳,因为使用了easycaching,不知是否有计划做freeredis与easycaching的适配?

catcherwong commented 1 year ago

@softworm easycaching 已经在适配 freeredis 了,预计4月份会正式发布。

softworm commented 1 year ago

稳,感谢:)