Skip to content

Commit f948158

Browse files
committed
RUBY-1222 Update method name
1 parent bc3b0fc commit f948158

File tree

4 files changed

+11
-5
lines changed

4 files changed

+11
-5
lines changed

lib/mongo/address.rb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,13 @@ def to_s
162162
port ? "#{host}:#{port}" : host
163163
end
164164

165-
def connect_socket(socket)
165+
# Connect a socket.
166+
#
167+
# @example Connect a socket.
168+
# address.connect_socket!(socket)
169+
#
170+
# @since 2.4.3
171+
def connect_socket!(socket)
166172
socket.connect!(connect_timeout)
167173
end
168174

lib/mongo/server.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ class Server
4646

4747
# The default time in seconds to timeout a connection attempt.
4848
#
49-
# @since 2.5.0
49+
# @since 2.4.3
5050
CONNECT_TIMEOUT = 10.freeze
5151

5252
# Get the description from the monitor and scan on monitor.

lib/mongo/server/connection.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ class Connection
6060
def connect!
6161
unless socket && socket.connectable?
6262
@socket = address.socket(socket_timeout, ssl_options)
63-
address.connect_socket(socket)
63+
address.connect_socket!(socket)
6464
handshake!
6565
authenticate!
6666
end

lib/mongo/server/monitor/connection.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ def ismaster
7676
def connect!
7777
unless socket && socket.connectable?
7878
@socket = address.socket(socket_timeout, ssl_options)
79-
address.connect_socket(socket)
79+
address.connect_socket!(socket)
8080
handshake!
8181
end
8282
true
@@ -133,7 +133,7 @@ def initialize(address, options = {})
133133
# uses the connect timeout value for calling ismaster. See the Server Discovery and
134134
# Monitoring specification for details.
135135
#
136-
# @since 2.5.0
136+
# @since 2.4.3
137137
def socket_timeout
138138
@timeout ||= options[:connect_timeout] || Server::CONNECT_TIMEOUT
139139
end

0 commit comments

Comments
 (0)