From 345769014810aabbf25361712b9346833c1e3444 Mon Sep 17 00:00:00 2001 From: "Mark S. Lewis" Date: Fri, 7 Jan 2022 15:37:13 +0000 Subject: [PATCH] Default timeouts for basic Gateway TypeScript sample (#573) Signed-off-by: Mark S. Lewis --- .../application-gateway-typescript/src/app.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/asset-transfer-basic/application-gateway-typescript/src/app.ts b/asset-transfer-basic/application-gateway-typescript/src/app.ts index 352be263..bd4dff49 100644 --- a/asset-transfer-basic/application-gateway-typescript/src/app.ts +++ b/asset-transfer-basic/application-gateway-typescript/src/app.ts @@ -41,6 +41,19 @@ async function main(): Promise { client, identity: await newIdentity(), signer: await newSigner(), + // Default timeouts for different gRPC calls + evaluateOptions: () => { + return { deadline: Date.now() + 5000 }; // 5 seconds + }, + endorseOptions: () => { + return { deadline: Date.now() + 15000 }; // 15 seconds + }, + submitOptions: () => { + return { deadline: Date.now() + 5000 }; // 5 seconds + }, + commitStatusOptions: () => { + return { deadline: Date.now() + 60000 }; // 1 minute + }, }); try {