Skip to content
This repository has been archived by the owner on Apr 14, 2023. It is now read-only.

Commit

Permalink
Merge pull request #177 from apollographql/docs/timeout
Browse files Browse the repository at this point in the history
Increase default timeout to 30s, and updated README timeout docs
  • Loading branch information
Urigo authored Jun 12, 2017
2 parents 6446163 + cc1c7e6 commit c041223
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Changelog

### vNEXT
- Increase default keep-alive timeout to 30s [PR #177](https://github.com/apollographql/subscriptions-transport-ws/pull/177)
- Operation key is now `string` instead of `number` [PR #176](https://github.com/apollographql/subscriptions-transport-ws/pull/176)
- ...

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/defaults.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const WS_TIMEOUT = 5000;
const WS_TIMEOUT = 30000;

export {
WS_TIMEOUT,
Expand Down

0 comments on commit c041223

Please sign in to comment.