Skip to content

Commit

Permalink
Merge pull request #178 from sdavis-r7/master
Browse files Browse the repository at this point in the history
Ability to handle FRAME_SIZE_ERROR gracefully as a connection error in plaintext mode.
  • Loading branch information
nwgh committed Apr 22, 2016
2 parents d36c8ee + 7b2c751 commit c4bde9c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/http.js
Original file line number Diff line number Diff line change
Expand Up @@ -956,6 +956,11 @@ Agent.prototype.request = function request(options, callback) {
request.emit('error', error);
});

endpoint.on('error', function(error){
self._log.error('Connection error: ' + error.toString());
request.emit('error', error);
});

this.endpoints[key] = endpoint;
endpoint.pipe(endpoint.socket).pipe(endpoint);
request._start(endpoint.createStream(), options);
Expand Down

0 comments on commit c4bde9c

Please sign in to comment.