From cbeb78f2046cc1eba83d887f92f684da82976970 Mon Sep 17 00:00:00 2001 From: Dimitrios Siganos Date: Tue, 6 Jul 2021 11:58:20 +0100 Subject: [PATCH] Remove 1 sec socket timeout in dev mode (becomes 2 sec as in normal mode) A 1 second timeout seems a little too aggressive even in dev mode. It can lead to false failures in tests. Also, it is a complication too far. It is an extra logical branch, a complication that, as far as I can see, it does not give us anything useful, except from the possibility of slightly faster unit test runs but reliability should be more important than a possible slight speed increase in unit test execution. --- nano/node/socket.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nano/node/socket.cpp b/nano/node/socket.cpp index 2b7da42656..c3b321ffe4 100644 --- a/nano/node/socket.cpp +++ b/nano/node/socket.cpp @@ -124,7 +124,7 @@ void nano::socket::stop_timer () void nano::socket::checkup () { std::weak_ptr this_w (shared_from_this ()); - node.workers.add_timed_task (std::chrono::steady_clock::now () + std::chrono::seconds (node.network_params.network.is_dev_network () ? 1 : 2), [this_w] () { + node.workers.add_timed_task (std::chrono::steady_clock::now () + std::chrono::seconds (2), [this_w] () { if (auto this_l = this_w.lock ()) { uint64_t now (nano::seconds_since_epoch ());