Add comment for pinging incompatible clients

If client is incompatible, connectionMonitor relies on peer->resetPing
to be triggered whenever data is received to prevent ping timeout.
The server stopped sending pings since 6.2 which meant resetPing
doesn't get triggered.
This commit is contained in:
Vishesh Yadav 2019-08-30 11:17:22 -07:00
parent 6c96735227
commit cf56b005e8
1 changed files with 2 additions and 0 deletions

View File

@ -296,6 +296,8 @@ ACTOR Future<Void> connectionMonitor( Reference<Peer> peer ) {
loop {
if (!FlowTransport::transport().isClient() && !peer->destination.isPublic() && peer->compatible) {
// Don't send ping messages to clients unless necessary. Instead monitor incoming client pings.
// We ignore this block for incompatible clients because pings from server would trigger the
// peer->resetPing and prevent 'connection_failed' due to ping timeout.
state double lastRefreshed = now();
state int64_t lastBytesReceived = peer->bytesReceived;
loop {