swoft-cloud / swoft-component

📦 This is a repository of centralized management of all swoft core components
https://www.swoft.org
Apache License 2.0
97 stars 107 forks source link

No reconnection is made when rpc client receive data has timed out #581

Closed sentrychen closed 4 years ago

sentrychen commented 4 years ago

如果在rpc client设置了read_timeout为一个非-1的值,当rpc server运行的时间超过read_timeout的时候,rpc client的sendAndRecv方法就会执行两次,结果就会导致服务端被正常调用两次! 因此当客户端错误为timeout的时候不能执行reconnect,而是应该立刻抛出异常。