Skip to content

Commit

Permalink
Merge branch 'master' of git@github.com:andris9/simplesmtp
Browse files Browse the repository at this point in the history
  • Loading branch information
Andris Reinman committed Feb 27, 2012
2 parents a89cc44 + 0009d3d commit ff070c6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/pool.js
Expand Up @@ -47,7 +47,7 @@ function SMTPConnectionPool(port, host, options){
* @public
*/
this.options = options || {};
this.options.maxConections = this.options.maxConections || 5;
this.options.maxConnections = this.options.maxConnections || 5;

/**
* An array of connections that are currently idle
Expand Down Expand Up @@ -100,7 +100,7 @@ SMTPConnectionPool.prototype.sendMail = function(message, callback){
}else{
this._messageQueue.push(message);

if(this._connectionsAvailable.length + this._connectionsInUse.length < this.options.maxConections){
if(this._connectionsAvailable.length + this._connectionsInUse.length < this.options.maxConnections){
this._createConnection();
}
}
Expand Down Expand Up @@ -308,7 +308,7 @@ SMTPConnectionPool.prototype._onConnectionEnd = function(connection){
// if there's still unprocessed mail and available connection slots, create
// a new connection
if(this._messageQueue.length &&
this._connectionsInUse.length + this._connectionsAvailable.length < this.options.maxConections){
this._connectionsInUse.length + this._connectionsAvailable.length < this.options.maxConnections){
this._createConnection();
}
};

0 comments on commit ff070c6

Please sign in to comment.