mirror of https://github.com/grpc/grpc-node.git
grpc-js: Handle the grpc-node.max_session_memory option consistently on the client and server
This commit is contained in:
parent
7282d06fae
commit
75a6d0a24b
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@grpc/grpc-js",
|
"name": "@grpc/grpc-js",
|
||||||
"version": "1.7.1",
|
"version": "1.7.2",
|
||||||
"description": "gRPC Library for Node - pure JS implementation",
|
"description": "gRPC Library for Node - pure JS implementation",
|
||||||
"homepage": "https://grpc.io/",
|
"homepage": "https://grpc.io/",
|
||||||
"repository": "https://github.com/grpc/grpc-node/tree/master/packages/grpc-js",
|
"repository": "https://github.com/grpc/grpc-node/tree/master/packages/grpc-js",
|
||||||
|
|
|
||||||
|
|
@ -346,6 +346,12 @@ export class Server {
|
||||||
serverOptions.maxSessionMemory = this.options[
|
serverOptions.maxSessionMemory = this.options[
|
||||||
'grpc-node.max_session_memory'
|
'grpc-node.max_session_memory'
|
||||||
];
|
];
|
||||||
|
} else {
|
||||||
|
/* By default, set a very large max session memory limit, to effectively
|
||||||
|
* disable enforcement of the limit. Some testing indicates that Node's
|
||||||
|
* behavior degrades badly when this limit is reached, so we solve that
|
||||||
|
* by disabling the check entirely. */
|
||||||
|
serverOptions.maxSessionMemory = Number.MAX_SAFE_INTEGER;
|
||||||
}
|
}
|
||||||
if ('grpc.max_concurrent_streams' in this.options) {
|
if ('grpc.max_concurrent_streams' in this.options) {
|
||||||
serverOptions.settings = {
|
serverOptions.settings = {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue