Uploaded image for project: 'Node.js Driver'
  1. Node.js Driver
  2. NODE-933

I can not make this code to work with replication se

    XMLWordPrintableJSON

Details

    Description

      ar MongoClient = require('mongodb').MongoClient,
      co = require('co'),
      assert = require('assert');

      co(function*()

      { // Connection URL var url = 'mongodb://localhost:27017/myproject'; // Use connect method to connect to the Server var db = yield MongoClient.connect(url); // Close the connection db.close(); }

      ).catch(function(err)

      { console.log(err.stack); }

      );

      if I replace the url like, const url = 'mongodb://alexlai:password@arch16GMongo01.yushei.me:27017,arch16GMongo02.yushei.me:27017,arch16GMongo03.yushei.me,arch16GMongo04.yushei.me:27017/YuShei?replicaSet=odroid00&connectTimeoutMS=1000';

      The code will open, but can not close the db connection. Without replication is fine.

      Attachments

        Activity

          People

            christkv Christian Amor Kvalheim
            raisousuke raisousuke
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: