Skip to content

Commit

Permalink
Delete compiled file when client disconnects
Browse files Browse the repository at this point in the history
  • Loading branch information
pauek committed Mar 31, 2011
1 parent afa2c21 commit 041e8b1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions server.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@

var express = require('express');
var fs = require('fs');
var app = express.createServer();
app.use(express.static(__dirname));

Expand Down Expand Up @@ -47,6 +48,7 @@ var Session = function (params) {
console.log("Session start: " + id + ' ' + client + ' ' + conn);

conn.addListener('end', function() {
fs.unlink('a.out.' + id);
console.log('Session end:' + id + ' ' + client + ' ' + conn);
});

Expand Down

0 comments on commit 041e8b1

Please sign in to comment.