Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix servers config loader

Version 0.2.6 bug fix related to relplica set configuration loading from
config.json files.
  • Loading branch information...
commit 3e6be2c4162b981d924901b5bdb3302b35bd9085 1 parent c1a3340
@jdarling authored
Showing with 9 additions and 4 deletions.
  1. +3 −2 lib/MongoConnection.js
  2. +1 −1  package.json
  3. +5 −1 readme.md
View
5 lib/MongoConnection.js
@@ -29,6 +29,7 @@ var mongodb = require("mongodb");
var Connection = mongodb.Connection;
var Server = mongodb.Server;
+var ReplSet = mongodb.ReplSet;
var Db = mongodb.Db;
var errors = {
@@ -56,7 +57,7 @@ var MongoConnection = exports.MongoConnection = function(options, callback){
var l = options.servers.length, server, serverConfig;
self.servers = [];
for(var i = 0; i<l; i++){
- serverConfig = self.servers[i];
+ serverConfig = options.servers[i];
if(typeof(serverConfig)=='string'){
serverConfig = {host: serverConfig, port: mongodb.Connection.DEFAULT_PORT};
}else if(typeof(serverConfig) === 'number' && isFinite(serverConfig)){
@@ -109,7 +110,7 @@ MongoConnection.prototype.open = function(callback){
server = self.servers[i];
servers.push(new Server(server.host, server.port, options.serverOptions||defaults.ServerOptions));
}
- serverConnection = ReplSetServers(servers);
+ serverConnection = ReplSet(servers);
}else{
serverConnection = new Server(self.server.host, self.server.port, options.serverOptions||defaults.ServerOptions);
}
View
2  package.json
@@ -4,7 +4,7 @@
"email": "jeremy.darling@gmail.com"
},
"name": "mongomq",
- "version": "0.2.5",
+ "version": "0.2.6",
"repository": {
"type": "git",
"url": "git://github.com/jdarling/MongoMQ.git"
View
6 readme.md
@@ -1,7 +1,8 @@
MongoMQ - Node.js MongoMQ
=========================
-Version 0.2.5 general code cleanup and some optimizations
+Version 0.2.6 bug fix related to relplica set configuration loading from config.json files.
+Version 0.2.5 general code cleanup and some optimizations.
Installation
============
@@ -258,6 +259,9 @@ How Events are stored
Update History
==============
+v0.2.6
+ * bug fix related to relplica set configuration loading from config.json files
+
v0.2.5
* General code cleanup and optimizations
* Examples cleanup and fixes
Please sign in to comment.
Something went wrong with that request. Please try again.