treat reseed connect timeout as a failure instead of a connection

This commit is contained in:
PobreGato
2026-09-09 20:35:08 -04:00
parent 0d655befa5
commit 5da917f576
+13 -2
View File
@@ -732,7 +732,14 @@ namespace data
ecode = ec;
});
service.run_for (std::chrono::seconds (RESEED_CONNECT_TIMEOUT));
if (!service.stopped()) s.lowest_layer().close ();
if (!service.stopped())
{
// the handler never ran, so ecode still holds success from resolve:
// without this the timeout reads as a connection and the request goes
// out on a socket that was just closed
ecode = boost::asio::error::timed_out;
s.lowest_layer().close ();
}
if (!ecode)
{
@@ -857,7 +864,11 @@ namespace data
ecode = ec;
});
service.run_for (std::chrono::seconds (2*RESEED_CONNECT_TIMEOUT));
if (!service.stopped()) s.close ();
if (!service.stopped())
{
ecode = boost::asio::error::timed_out;
s.close ();
}
if (!ecode)
{