Skip to content

Commit

Permalink
Increaes timeouts to avoid timing out in libs init under slow connect…
Browse files Browse the repository at this point in the history
…ions (#111)

* Increase web3manager and discprov request timeouts to 10s from 2s and 3s respectively

* Bump libs
  • Loading branch information
piazzatron authored Sep 30, 2019
1 parent 8a61336 commit 5002837
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion libs/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@audius/libs",
"version": "0.11.25",
"version": "0.11.26",
"description": "",
"main": "src/index.js",
"browser": {
Expand Down
2 changes: 1 addition & 1 deletion libs/src/services/discoveryProvider/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ class DiscoveryProvider {
url: requestUrl,
headers: headers,
method: 'get',
timeout: 3000
timeout: 10000
}

try {
Expand Down
2 changes: 1 addition & 1 deletion libs/src/services/web3Manager/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class Web3Manager {
web3Config.internalWeb3Config.web3ProviderEndpoint
) {
// either user has external web3 but it's not configured, or doesn't have web3
this.web3 = new Web3(this.provider(web3Config.internalWeb3Config.web3ProviderEndpoint, 2000))
this.web3 = new Web3(this.provider(web3Config.internalWeb3Config.web3ProviderEndpoint, 10000))
this.useExternalWeb3 = false

// create private key pair here if it doesn't already exist
Expand Down

0 comments on commit 5002837

Please sign in to comment.