mirror of
https://github.com/grpc/grpc-node.git
synced 2025-12-08 18:23:54 +00:00
Merge pull request #3029 from murgatroid99/grpc-js_keepalive_fix_backport
Backport "Fix server keep alive timeout not properly destroying connections" to 1.14.x
This commit is contained in:
commit
bf0dc8fb72
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@grpc/grpc-js",
|
||||
"version": "1.14.1",
|
||||
"version": "1.14.2",
|
||||
"description": "gRPC Library for Node - pure JS implementation",
|
||||
"homepage": "https://grpc.io/",
|
||||
"repository": "https://github.com/grpc/grpc-node/tree/master/packages/grpc-js",
|
||||
|
||||
@ -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();
|
||||
@ -1631,7 +1631,7 @@ export class Server {
|
||||
'Connection dropped due to ping send error: ' + pingSendError
|
||||
);
|
||||
sessionClosedByServer = true;
|
||||
session.close();
|
||||
session.destroy();
|
||||
return;
|
||||
}
|
||||
|
||||
@ -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?.();
|
||||
};
|
||||
@ -1803,7 +1803,7 @@ export class Server {
|
||||
duration
|
||||
);
|
||||
sessionClosedByServer = true;
|
||||
session.close();
|
||||
session.destroy();
|
||||
} else {
|
||||
this.keepaliveTrace('Received ping response');
|
||||
maybeStartKeepalivePingTimer();
|
||||
@ -1826,7 +1826,7 @@ export class Server {
|
||||
'Connection dropped due to ping send error: ' + pingSendError
|
||||
);
|
||||
sessionClosedByServer = true;
|
||||
session.close();
|
||||
session.destroy();
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1840,7 +1840,7 @@ export class Server {
|
||||
'Connection dropped by keepalive timeout from ' + clientAddress
|
||||
);
|
||||
sessionClosedByServer = true;
|
||||
session.close();
|
||||
session.destroy();
|
||||
}, this.keepaliveTimeoutMs);
|
||||
keepaliveTimeout.unref?.();
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user