From 39f11520f38f0902edf00f2c2a2551d665b1f5ad Mon Sep 17 00:00:00 2001 From: imjoey Date: Tue, 29 Oct 2019 14:55:34 +0800 Subject: [PATCH] Fix the default value of waitForReady in doc In my usecase, the default behavious of `waitForReady` for RPC is `false` that not in accord with the doc. After digging into the source codes, probably the doc is incorrect. Signed-off-by: imjoey --- packages/grpc-js/src/metadata.ts | 2 +- packages/grpc-native-core/index.d.ts | 2 +- packages/grpc-native-core/src/metadata.js | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/grpc-js/src/metadata.ts b/packages/grpc-js/src/metadata.ts index 1537b31a..67a23960 100644 --- a/packages/grpc-js/src/metadata.ts +++ b/packages/grpc-js/src/metadata.ts @@ -66,7 +66,7 @@ export interface MetadataOptions { /* Signal that the request is idempotent. Defaults to false */ idempotentRequest?: boolean; /* Signal that the call should not return UNAVAILABLE before it has - * started. Defaults to true. */ + * started. Defaults to false. */ waitForReady?: boolean; /* Signal that the call is cacheable. GRPC is free to use GET verb. * Defaults to false */ diff --git a/packages/grpc-native-core/index.d.ts b/packages/grpc-native-core/index.d.ts index 25815ce6..33956aa1 100644 --- a/packages/grpc-native-core/index.d.ts +++ b/packages/grpc-native-core/index.d.ts @@ -554,7 +554,7 @@ declare module "grpc" { /* Signal that the request is idempotent. Defaults to false */ idempotentRequest?: boolean; /* Signal that the call should not return UNAVAILABLE before it has - * started. Defaults to true. */ + * started. Defaults to false. */ waitForReady?: boolean; /* Signal that the call is cacheable. GRPC is free to use GET verb. * Defaults to false */ diff --git a/packages/grpc-native-core/src/metadata.js b/packages/grpc-native-core/src/metadata.js index ee442953..279dee18 100644 --- a/packages/grpc-native-core/src/metadata.js +++ b/packages/grpc-native-core/src/metadata.js @@ -37,7 +37,7 @@ const CORKED_FLAG = 0x100; * a client request. * @param {boolean=} [options.idempotentRequest=false] Signal that the request * is idempotent - * @param {boolean=} [options.waitForReady=true] Signal that the call should + * @param {boolean=} [options.waitForReady=false] Signal that the call should * not return UNAVAILABLE before it has started. * @param {boolean=} [options.cacheableRequest=false] Signal that the call is * cacheable. GRPC is free to use GET verb. @@ -170,7 +170,7 @@ Metadata.prototype.clone = function() { * a client request. * @param {boolean=} [options.idempotentRequest=false] Signal that the request * is idempotent - * @param {boolean=} [options.waitForReady=true] Signal that the call should + * @param {boolean=} [options.waitForReady=false] Signal that the call should * not return UNAVAILABLE before it has started. * @param {boolean=} [options.cacheableRequest=false] Signal that the call is * cacheable. GRPC is free to use GET verb.