ping client: use async dial and a longer timeout

This commit is contained in:
Florian Lüke 2024-12-07 20:35:51 +01:00
parent b0ca75960b
commit c729069c2b

View file

@ -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;