ping client: use async dial and a longer timeout
This commit is contained in:
parent
b0ca75960b
commit
c729069c2b
1 changed files with 2 additions and 2 deletions
|
@ -61,9 +61,9 @@ int main()
|
|||
{
|
||||
spdlog::set_level(spdlog::level::info);
|
||||
|
||||
auto socket = nng::make_req_socket();
|
||||
auto socket = nng::make_req_socket(1000);
|
||||
|
||||
if (int res = nng_dial(socket, "tcp://localhost:5555", nullptr, 0))
|
||||
if (int res = nng_dial(socket, "tcp://localhost:5555", nullptr, NNG_FLAG_NONBLOCK))
|
||||
{
|
||||
nng::mnode_nng_error("nng_dial", res);
|
||||
return res;
|
||||
|
|
Loading…
Reference in a new issue