From 91ba6854016235070a88498c629b82dece5781de Mon Sep 17 00:00:00 2001 From: reality Date: Sat, 5 Jan 2013 01:36:36 +0000 Subject: [PATCH] fix express close for 3.0. you could document your shit guys --- modules/web/web.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/modules/web/web.js b/modules/web/web.js index 3f3b897..234bfa3 100644 --- a/modules/web/web.js +++ b/modules/web/web.js @@ -11,9 +11,8 @@ var webInterface = function(dbot) { app.get('/', function(req, res) { res.render('index', { 'name': dbot.config.name }); }); - - app.listen(dbot.config.web.webPort); + var server = app.listen(dbot.config.web.webPort); var reloadPages = function(pages) { for(var p in pages) { @@ -40,7 +39,7 @@ var webInterface = function(dbot) { 'reloadPages': reloadPages, 'onDestroy': function() { - app.close(); + server.close(); } }; };