WIP: initial prototype

- Standardized event emitters
- Refactored transport.request to have a better handling of the state
- Added sniff event
- Improved abort handling
This commit is contained in:
delvedor
2018-12-03 18:06:09 +01:00
parent ab1d7ba992
commit fd738f8425
6 changed files with 112 additions and 67 deletions

View File

@ -77,6 +77,15 @@ class Connection {
}
})
// updates the ended state
request.on('abort', () => {
debug('Request aborted', params)
if (ended === false) {
ended = true
this._openRequests--
}
})
// Disables the Nagle algorithm
request.setNoDelay(true)