Permalink
Browse files

Small bugfix

  • Loading branch information...
kennethkalmer authored and miksago committed Jan 18, 2010
1 parent 96137a4 commit ead6abb5bb3de62e935e21fadb0cb0d6441f9f39
Showing with 5 additions and 2 deletions.
  1. +5 −2 lib/smtp/server.js
View
@@ -209,6 +209,9 @@ SMTPSession.prototype.extractArguments = function( command ) {
return this.buffer.replace( command, '' ).replace(/^\s\s*/, '').replace(/\s\s*$/, '');
}
+/*
+ Server class
+*/
var Server = exports.Server = function() {
process.EventEmitter.call( this );
@@ -232,8 +235,8 @@ Server.prototype.runServer = function() {
for( var i = 0; i < session.events.length; i++ ) {
var e = session.events[i];
if( self.listeners( e ).length > 0 ) {
- session.addListener('connect', function() {
- self.emit('connect', arguments);
+ session.addListener( e, function() {
+ self.emit( e, arguments);
});
}
}

0 comments on commit ead6abb

Please sign in to comment.