Skip to content

Commit c4bde9c

Browse files
committed
Merge pull request molnarg#178 from sdavis-r7/master
Ability to handle FRAME_SIZE_ERROR gracefully as a connection error in plaintext mode.
2 parents d36c8ee + 7b2c751 commit c4bde9c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/http.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -956,6 +956,11 @@ Agent.prototype.request = function request(options, callback) {
956956
request.emit('error', error);
957957
});
958958

959+
endpoint.on('error', function(error){
960+
self._log.error('Connection error: ' + error.toString());
961+
request.emit('error', error);
962+
});
963+
959964
this.endpoints[key] = endpoint;
960965
endpoint.pipe(endpoint.socket).pipe(endpoint);
961966
request._start(endpoint.createStream(), options);

0 commit comments

Comments
 (0)