1337
1338 if (!ShouldRunInactivityChecks(node, now)) return false;
1339
1340- if (node.m_last_recv == 0 || node.m_last_send == 0) {
1341- LogPrint(BCLog::NET, "socket no message in first %i seconds, %d %d peer=%d\n", m_peer_connect_timeout, node.m_last_recv != 0, node.m_last_send != 0, node.GetId());
1342+ if (last_recv.count() == 0 || last_send.count() == 0) {
Why sometimes .count()
and sometimes count_seconds()
?
last_recv
is a bit like std::optional
. I use .count()
, when .has_value()
would be used and I use count_seconds()
, when .value()
would be used.