Skip to content

Commit

Permalink
When consumer has not timeout,use timeout of provider. (sofastack#507)
Browse files Browse the repository at this point in the history
leizhiyuan authored Feb 20, 2019

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent ea47441 commit 89caff4
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -48,7 +48,6 @@
import static com.alipay.sofa.rpc.common.RpcOptions.CONSUMER_DISCONNECT_TIMEOUT;
import static com.alipay.sofa.rpc.common.RpcOptions.CONSUMER_HEARTBEAT_PERIOD;
import static com.alipay.sofa.rpc.common.RpcOptions.CONSUMER_INJVM;
import static com.alipay.sofa.rpc.common.RpcOptions.CONSUMER_INVOKE_TIMEOUT;
import static com.alipay.sofa.rpc.common.RpcOptions.CONSUMER_INVOKE_TYPE;
import static com.alipay.sofa.rpc.common.RpcOptions.CONSUMER_LAZY;
import static com.alipay.sofa.rpc.common.RpcOptions.CONSUMER_LOAD_BALANCER;
@@ -209,7 +208,7 @@ public class ConsumerConfig<T> extends AbstractInterfaceConfig<T, ConsumerConfig
/**
* 客户端调用超时时间(毫秒)
*/
protected int timeout = getIntValue(CONSUMER_INVOKE_TIMEOUT);
protected int timeout = -1;

/**
* The Retries. 失败后重试次数
Original file line number Diff line number Diff line change
@@ -190,7 +190,7 @@ PS:大家也看到了,本JSON文档是支持注释的,而标准JSON是不支
// 默认consumer断开时等待结果的超时时间
"consumer.disconnect.timeout": 10000,
// 默认consumer调用provider超时时间
"consumer.invoke.timeout": 5000,
"consumer.invoke.timeout": 3000,
// 心跳发送间隔
"consumer.heartbeat.period": 30000,
// 重建连接间隔

0 comments on commit 89caff4

Please sign in to comment.