Is it possible to reduce ping time and timeout?
Like this:
https://github.com/sipa/bitcoin/commit/f9eeb06c10d826a56389b8473ec48549d4d57787but just changing the numbers to 2 and 5 minutes is fine, i.e.
/ Keep-alive ping
// if (pto->nLastSend && GetTime() - pto->nLastSend > 30 * 60 && pto->vSend.empty())
if (pto->nLastSend && GetTime() - pto->nLastSend > 2 * 60 && pto->vSend.empty())
pto->PushMessage("ping");
and
// else if (GetTime() - pnode->nLastSend > 90*60 && GetTime() - pnode->nLastSendEmpty > 90*60)
else if (GetTime() - pnode->nLastSend > 5*60 && GetTime() - pnode->nLastSendEmpty > 5*60)
{
printf("socket not sending\n");
pnode->fDisconnect = true;
}
// else if (GetTime() - pnode->nLastRecv > 90*60)
else if (GetTime() - pnode->nLastRecv > 5*60)
{
printf("socket inactivity timeout\n");
pnode->fDisconnect = true;
}
Additional traffic is only a few bytes every 2 minutes and it
really does help everyone with crappy internet connection to stay synced to the latest block and game turn,
as the connections tend to "stall" otherwise after some time. (connection showing up as 'established' when it's actually dead)