Open kirtapnosslin opened 8 years ago
this is extremely odd to have a leak like this, because we don't add a single 'close' listener in the code. That being said I'd try to find where it happens first. This module is used heavily in production and never had any odd problems with this.
However, I'm using the .use
, and it the demo code .pre
is used, because otherwise restify will always return 404 due to non-matching routes
I have:
node --version v6.9.1 npm --version 3.10.8 restify@4.2.0 serve-static-restify@1.0.0
With source code:
var restify = require('restify'); var serveStatic = require('serve-static-restify'); var app = restify.createServer(); app.pre(serveStatic('app')); app.listen(3000);
When I run it, it works but I get alot of: (node:7472) Warning: Possible EventEmitter memory leak detected. 11 close listeners added. Use emitter.setMaxListeners() to increase limit