This commit is contained in:
Yaroslav Kukharuk
2020-11-02 16:05:47 +02:00
parent 7238d509f1
commit be2bef6f3f
2 changed files with 8 additions and 43 deletions
+8 -4
View File
@@ -71,8 +71,10 @@ class Client extends EventEmitter {
res.writeHead(clientRes.statusCode, clientRes.headers);
// using pump is deliberate - see the pump docs for why
pump(clientRes, res, function(err) {
this.debug('> PIPE FINISHED, %s', err);
pump(clientRes, res, (err) => {
if (err) {
this.debug('> PIPE ERROR, %s', err);
}
});
});
@@ -86,8 +88,10 @@ class Client extends EventEmitter {
});
// using pump is deliberate - see the pump docs for why
pump(req, clientReq, function(err) {
this.debug('< PIPE FINISHED, %s', err);
pump(req, clientReq, (err) => {
if (err) {
this.debug('< PIPE ERROR, %s', err);
}
});
}