Skip to content

Commit

Permalink
Update index.js (#1473)
Browse files Browse the repository at this point in the history
Set XHR object timeout;
  • Loading branch information
Fi1osof authored and frozeman committed Apr 19, 2018
1 parent 6e7e2a1 commit e2c79ee
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/web3-providers-http/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ HttpProvider.prototype._prepareRequest = function(){

request.open('POST', this.host, true);
request.setRequestHeader('Content-Type','application/json');
request.timeout = this.timeout && this.timeout !== 1 ? this.timeout : 0;

if(this.headers) {
this.headers.forEach(function(header) {
Expand Down

0 comments on commit e2c79ee

Please sign in to comment.