Skip to content

服务长时间不返回客户端调用直接异常结束 #618

Answered by qicosmos
jjqcat asked this question in Q&A
Discussion options

You must be logged in to vote

客户端默认超时时间是5秒,你可以把调用的超时时间改成20秒或更长。

参考这个代码:
https://github.com/alibaba/yalantinglibs/blob/main/src/coro_rpc/tests/test_coro_rpc_client.cpp#L134

co_await client->call_for< coro_Work >(30s);

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by poor-circle
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@jjqcat
Comment options

@poor-circle
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #617 on March 04, 2024 02:31.