Fixed references to listener when logging

This commit is contained in:
Guillermo Rauch
2011-02-18 15:18:10 -08:00
parent cd9cbb500b
commit ff10eeecba
2 changed files with 2 additions and 2 deletions

View File

@@ -33,7 +33,7 @@ HTMLFile.prototype._onConnect = function(req, res){
var msg = qs.parse(body);
self._onMessage(msg.data);
} catch(e){
listener.options.log('htmlfile message handler error - ' + e.stack);
this.listener.options.log('htmlfile message handler error - ' + e.stack);
}
res.writeHead(200, {'Content-Type': 'text/plain'});
res.write('ok');

View File

@@ -49,7 +49,7 @@ Polling.prototype._onConnect = function(req, res){
var msg = qs.parse(body);
self._onMessage(msg.data);
} catch(e){
listener.options.log('xhr-polling message handler error - ' + e.stack);
this.listener.options.log('xhr-polling message handler error - ' + e.stack);
}
res.writeHead(200, headers);
res.write('ok');