Skip to content

Commit

Permalink
Log idle timeouts [improve]
Browse files Browse the repository at this point in the history
  • Loading branch information
overlookmotel committed Oct 5, 2020
1 parent 86d9c20 commit 56d6ee8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/transfer.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,10 @@ Transfer.prototype.get = function() {
const setIdleTimeout = () => {
if (idleTimeout) {
clearIdleTimeout();
idleTimer = setTimeout(() => this.req.abort(), idleTimeout);
idleTimer = setTimeout(() => {
this.log(`Connection idle for ${idleTimeout}ms - aborting`);
this.req.abort();
}, idleTimeout);
}
};
function clearIdleTimeout() {
Expand Down

0 comments on commit 56d6ee8

Please sign in to comment.