Permalink
Browse files

Merge pull request #1 from rikkiloades/patch-1

Fixes a bug where the connection would timeout.
  • Loading branch information...
2 parents 78e1eaf + 88c807d commit 4684eb7f73c2ea993f3f682f976e2c081ae171ce @euangoddard committed Apr 18, 2013
Showing with 3 additions and 5 deletions.
  1. +3 −5 smtpevent.js
View
@@ -182,11 +182,6 @@ var SMTPConnection = function (hostname, server, socket) {
}
// Event listeners:
- socket.on('connect', function () {
- util.log('Socket connected from: ' + socket.remoteAddress + '. Sending welcome message.');
- send_response('220 ' + hostname +' node.js smtpevent server ' + server.version);
- });
-
socket.on('data', function (buffer) {
var line = buffer.toString(),
method = null,
@@ -262,6 +257,9 @@ var SMTPConnection = function (hostname, server, socket) {
util.log('Socket closed, destroying SMTPConnection instance');
delete self;
});
+
+ util.log('Socket connected from: ' + socket.remoteAddress + '. Sending welcome message.');
+ send_response('220 ' + hostname +' node.js smtpevent server ' + server.version);
}
sys.inherits(SMTPServer, net.Server);

0 comments on commit 4684eb7

Please sign in to comment.