Skip to content

Commit 06b63c1

Browse files
committed
Remove prints, rescue in mongo namespace on address
1 parent fefd2de commit 06b63c1

File tree

3 files changed

+2
-8
lines changed

3 files changed

+2
-8
lines changed

lib/mongo/address.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ def initialize_resolver!(timeout, ssl_options)
159159
res = FAMILY_MAP[info[4]].new(info[3], port, host)
160160
res.socket(timeout, ssl_options).connect!.close
161161
return res
162-
rescue IOError, SystemCallError, Error::SocketError => e
162+
rescue IOError, SystemCallError, Mongo::Error::SocketError => e
163163
error = e
164164
end
165165
end

lib/mongo/server/connectable.rb

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,7 @@ module Connectable
4949
#
5050
# @since 2.1.0
5151
def connectable?
52-
begin
53-
ping
54-
rescue Exception => e
55-
p e
56-
false
57-
end
52+
begin; ping; rescue; false; end
5853
end
5954

6055
# Determine if the connection is currently connected.

lib/mongo/server/connection.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,6 @@ def ping
169169
ensure_connected do |socket|
170170
socket.write(PING_BYTES)
171171
reply = Protocol::Reply.deserialize(socket)
172-
p reply
173172
reply.documents[0][Operation::Result::OK] == 1
174173
end
175174
end

0 commit comments

Comments
 (0)