lib/mongo/cluster.rb in mongo-2.4.2 vs lib/mongo/cluster.rb in mongo-2.4.3
- old
+ new
@@ -1,6 +1,6 @@
-# Copyright (C) 2014-2016 MongoDB, Inc.
+# Copyright (C) 2014-2017 MongoDB, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
@@ -94,10 +94,10 @@
#
# @return [ Server ] The newly added server, if not present already.
#
# @since 2.0.0
def add(host)
- address = Address.new(host)
+ address = Address.new(host, options)
if !addresses.include?(address)
if addition_allowed?(address)
@update_lock.synchronize { @addresses.push(address) }
server = Server.new(address, self, @monitoring, event_listeners, options)
@update_lock.synchronize { @servers.push(server) }