Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions packages/grpc-js/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1609,7 +1609,7 @@ export class Server {
if (err) {
this.keepaliveTrace('Ping failed with error: ' + err.message);
sessionClosedByServer = true;
session.close();
session.destroy();
} else {
this.keepaliveTrace('Received ping response');
maybeStartKeepalivePingTimer();
Expand All @@ -1631,7 +1631,7 @@ export class Server {
'Connection dropped due to ping send error: ' + pingSendError
);
sessionClosedByServer = true;
session.close();
session.destroy();
return;
}

Expand All @@ -1640,7 +1640,7 @@ export class Server {
this.keepaliveTrace('Ping timeout passed without response');
this.trace('Connection dropped by keepalive timeout');
sessionClosedByServer = true;
session.close();
session.destroy();
}, this.keepaliveTimeoutMs);
keepaliveTimer.unref?.();
};
Expand Down Expand Up @@ -1803,7 +1803,7 @@ export class Server {
duration
);
sessionClosedByServer = true;
session.close();
session.destroy();
} else {
this.keepaliveTrace('Received ping response');
maybeStartKeepalivePingTimer();
Expand All @@ -1826,7 +1826,7 @@ export class Server {
'Connection dropped due to ping send error: ' + pingSendError
);
sessionClosedByServer = true;
session.close();
session.destroy();
return;
}

Expand All @@ -1840,7 +1840,7 @@ export class Server {
'Connection dropped by keepalive timeout from ' + clientAddress
);
sessionClosedByServer = true;
session.close();
session.destroy();
}, this.keepaliveTimeoutMs);
keepaliveTimeout.unref?.();
};
Expand Down