From ce0cc6dfae950ebff0773748a576d2fb2b43a10a Mon Sep 17 00:00:00 2001 From: dotansimha Date: Mon, 12 Jun 2017 11:13:59 +0300 Subject: [PATCH 1/3] docs(client): updated README and timeout docs --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 73b7f9a01..d6fe12950 100644 --- a/README.md +++ b/README.md @@ -216,7 +216,7 @@ ReactDOM.render( ### `Constructor(url, options, connectionCallback)` - `url: string` : url that the client will connect to, starts with `ws://` or `wss://` - `options?: Object` : optional, object to modify default client behavior - * `timeout?: number` : how long the client should wait in ms for a subscription to be started (default 5000 ms)how long the client should wait in ms for a subscription to be started (default 5000 ms) + * `timeout?: number` : how long the client should wait in ms for a keep-alive message from the server (default 5000 ms), this parameter is ignored if the server does not send keep-alive messages. * `lazy?: boolean` : use to set lazy mode - connects only when first subscription created, and delay the socket initialization * `connectionParams?: Object | Function` : object that will be available as first argument of `onConnect` (in server side), if passed a function - it will call it and send the return value. * `reconnect?: boolean` : automatic reconnect in case of connection error From aad2839abbcc8a731877a38ba3e5454f7e851af4 Mon Sep 17 00:00:00 2001 From: dotansimha Date: Mon, 12 Jun 2017 11:30:23 +0300 Subject: [PATCH 2/3] bugfix(timeout): increase default timeout to 30s --- src/defaults.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/defaults.ts b/src/defaults.ts index d6d446c9b..b1ec67817 100644 --- a/src/defaults.ts +++ b/src/defaults.ts @@ -1,4 +1,4 @@ -const WS_TIMEOUT = 5000; +const WS_TIMEOUT = 30000; export { WS_TIMEOUT, From f3604ee691823e975bf3c9a8854e1828944c80e7 Mon Sep 17 00:00:00 2001 From: dotansimha Date: Mon, 12 Jun 2017 11:31:11 +0300 Subject: [PATCH 3/3] bugfix(timeout): updated changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 29475a738..440a9c18c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ # Changelog ### vNEXT +- Increase default keep-alive timeout to 30s [PR #177](https://github.com/apollographql/subscriptions-transport-ws/pull/177) - ... ### 0.7.1