Permalink
Browse files

fixed v0.4 net.connect

  • Loading branch information...
1 parent 66fddce commit 74c485b89dff4fe637576574c26ad0ac826eab46 Andris Reinman committed Feb 16, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/client.js
View
@@ -144,7 +144,8 @@ SMTPClient.prototype.connect = function(){
if(this.options.secureConnection){
this.socket = tls.connect(this.port, this.host, {}, this._onConnect.bind(this));
}else{
- this.socket = net.connect(this.port, this.host, this._onConnect.bind(this));
+ this.socket = net.connect(this.port, this.host);
+ this.socket.on("connect", this._onConnect.bind(this));
}
this.socket.on("error", this._onError.bind(this));

0 comments on commit 74c485b

Please sign in to comment.