From 72e472aeb71368db6d9cfbc21d1edb7f84daf038 Mon Sep 17 00:00:00 2001 From: "Mark S. Lewis" Date: Fri, 7 Jan 2022 14:03:54 +0000 Subject: [PATCH] Default timeouts for basic Gateway TypeScript sample 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 {