| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 60b5e69 commit 36b4ddd
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -169,7 +169,7 @@ IncomingMessage.prototype._destroy = function _destroy(err, cb) { | |||
| 169 | 169 | this.emit('aborted'); | |
| 170 | 170 | } | |
| 171 | 171 | ||
| 172 | - // If aborted and the underlying socket not already destroyed, | ||
| 172 | + // If aborted and the underlying socket is not already destroyed, | ||
| 173 | 173 | // destroy it. | |
| 174 | 174 | // We have to check if the socket is already destroyed because finished | |
| 175 | 175 | // does not call the callback when this methdod is invoked from `_http_client` | |
@@ -178,10 +178,10 @@ IncomingMessage.prototype._destroy = function _destroy(err, cb) { | |||
| 178 | 178 | this.socket.destroy(err); | |
| 179 | 179 | const cleanup = finished(this.socket, (e) => { | |
| 180 | 180 | cleanup(); | |
| 181 | - onError(this, cb, e || err); | ||
| 181 | + onError(this, e || err, cb); | ||
| 182 | 182 | }); | |
| 183 | 183 | } else { | |
| 184 | - onError(this, cb, err); | ||
| 184 | + onError(this, err, cb); | ||
| 185 | 185 | } | |
| 186 | 186 | }; | |
| 187 | 187 | ||
@@ -361,7 +361,7 @@ IncomingMessage.prototype._dump = function _dump() { | |||
| 361 | 361 | } | |
| 362 | 362 | }; | |
| 363 | 363 | ||
| 364 | - function onError(instance, cb, error) { | ||
| 364 | + function onError(instance, error, cb) { | ||
| 365 | 365 | // This is to keep backward compatible behavior. | |
| 366 | 366 | // An error is emitted only if there are listeners attached to | |
| 367 | 367 | // the event. | |
| Back | FazBrowse Home | New Git URL |
0 commit comments