Changeset View
Changeset View
Standalone View
Standalone View
src/net.cpp
Show First 20 Lines • Show All 1,501 Lines • ▼ Show 20 Lines | while (!interruptNet) { | ||||
} | } | ||||
// | // | ||||
// Inactivity checking | // Inactivity checking | ||||
// | // | ||||
int64_t nTime = GetSystemTimeInSeconds(); | int64_t nTime = GetSystemTimeInSeconds(); | ||||
if (nTime - pnode->nTimeConnected > 60) { | if (nTime - pnode->nTimeConnected > 60) { | ||||
if (pnode->nLastRecv == 0 || pnode->nLastSend == 0) { | if (pnode->nLastRecv == 0 || pnode->nLastSend == 0) { | ||||
LogPrint(BCLog::NET, "socket no message in first 60 " | LogPrint(BCLog::NET, | ||||
"seconds, %d %d from %d\n", | "socket no message in first 60 seconds, %d %d " | ||||
"from %d\n", | |||||
pnode->nLastRecv != 0, pnode->nLastSend != 0, | pnode->nLastRecv != 0, pnode->nLastSend != 0, | ||||
pnode->GetId()); | pnode->GetId()); | ||||
pnode->fDisconnect = true; | pnode->fDisconnect = true; | ||||
} else if (nTime - pnode->nLastSend > TIMEOUT_INTERVAL) { | } else if (nTime - pnode->nLastSend > TIMEOUT_INTERVAL) { | ||||
LogPrintf("socket sending timeout: %is\n", | LogPrintf("socket sending timeout: %is\n", | ||||
nTime - pnode->nLastSend); | nTime - pnode->nLastSend); | ||||
pnode->fDisconnect = true; | pnode->fDisconnect = true; | ||||
} else if (nTime - pnode->nLastRecv > | } else if (nTime - pnode->nLastRecv > | ||||
▲ Show 20 Lines • Show All 1,581 Lines • Show Last 20 Lines |