Skip to content

Commit

Permalink
feat: increase default ack message timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
ilbertt committed Nov 29, 2023
1 parent 85f985f commit 41b7c87
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ic-websocket.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ import { WsAgent } from "./agent";
* The default expiration time for receiving an ack message from the canister after sending a message.
* It's **3/2 times** the canister's default send ack period.
*/
const DEFAULT_ACK_MESSAGE_TIMEOUT_MS = 90000;
const DEFAULT_ACK_MESSAGE_TIMEOUT_MS = 450_000;

/**
* Interface to create a new IcWebSocketConfig. For a simple configuration, use {@link createWsConfig}.
Expand All @@ -65,7 +65,7 @@ export interface IcWebSocketConfig<S extends _WS_CANISTER_SERVICE> {
* The expiration (in milliseconds) time for receiving an ack message from the canister after sending a message.
* If the ack message is not received within this time, the connection will be closed.
* This parameter should always me **3/2 times or more** the canister's send ack period.
* @default 90000 (90 seconds = 3/2 default send ack period on the canister)
* @default 450_000 (7.5 minutes = 3/2 default send ack period on the canister)
*/
ackMessageTimeout?: number;
/**
Expand Down

0 comments on commit 41b7c87

Please sign in to comment.