connect-settimeout
Advanced tools
Comparing version 0.0.1 to 0.0.2
@@ -11,5 +11,8 @@ module.exports = function(cb, duration, options){ | ||
}, duration); | ||
res.on('finish', function(evt){ | ||
function onEnd() { | ||
clearTimeout(res.connectSetTimeouts[timeoutName]); | ||
}); | ||
} | ||
res.on('finish', onEnd); | ||
res.on('close', onEnd); | ||
next(); | ||
@@ -16,0 +19,0 @@ }; |
{ | ||
"name": "connect-settimeout", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": "a connect middleware that runs a provided function if a request lasts longer than a given duration", | ||
@@ -39,4 +39,3 @@ "main": "index.js", | ||
"homepage": "https://github.com/cainus/connect-settimeout", | ||
"dependencies": { | ||
} | ||
"dependencies": {} | ||
} |
Sorry, the diff of this file is not supported yet
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
7038
97
2