Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

clean up that pesky interval

  • Loading branch information...
commit ad648b249273503ce4d2508261077e456f2cf3d4 1 parent 6f5de87
@substack authored
Showing with 5 additions and 1 deletion.
  1. +5 −1 server.js
View
6 server.js
@@ -3,5 +3,9 @@ var cube = require('surrender-cube');
var charm = require('charm');
http.createServer(function (req, res) {
- cube({ charm : charm(req, res) });
+ var iv = cube({ charm : charm(req, res) });
+
+ req.connection.on('end', function () {
+ clearInterval(iv);
+ });
}).listen(8080);
Please sign in to comment.
Something went wrong with that request. Please try again.