Skip to content

Instantly share code, notes, and snippets.

@maritz
Created April 5, 2015 01:44
Show Gist options
  • Save maritz/9acbc312688bb52bbe4e to your computer and use it in GitHub Desktop.
Save maritz/9acbc312688bb52bbe4e to your computer and use it in GitHub Desktop.
http server not closing
Server listening on 3020
closing
var http = require("http");
var server = http.createServer();
server.listen( 3020, "0.0.0.0", function () {
console.log("Server listening on 3020");
server.on("request", function (req, res) {
res.end("shutting down");
console.log("closing");
server.close( function() {
console.log("closed");
});
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment