Skip to content

Commit 673b79e

Browse files
committed
Remove dead server monitor connection code
1 parent c0a94a2 commit 673b79e

File tree

1 file changed

+0
-26
lines changed

1 file changed

+0
-26
lines changed

lib/mongo/server/monitor/connection.rb

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -107,25 +107,6 @@ def disconnect!
107107
true
108108
end
109109

110-
# Dispatch the provided messages to the connection. If the last message
111-
# requires a response a reply will be returned.
112-
#
113-
# @example Dispatch the messages.
114-
# connection.dispatch([ insert, command ])
115-
#
116-
# @note This method is named dispatch since 'send' is a core Ruby method on
117-
# all objects.
118-
#
119-
# @param [ Array<Message> ] messages The messages to dispatch.
120-
#
121-
# @return [ Protocol::Reply ] The reply if needed.
122-
#
123-
# @since 2.0.0
124-
def dispatch(messages)
125-
write(messages)
126-
messages.last.replyable? ? read : nil
127-
end
128-
129110
# Initialize a new socket connection from the client to the server.
130111
#
131112
# @api private
@@ -147,13 +128,6 @@ def initialize(address, options = {})
147128
@socket = nil
148129
@pid = Process.pid
149130
end
150-
151-
private
152-
153-
def write(messages, buffer = BSON::ByteBuffer.new)
154-
messages.each{ |message| message.serialize(buffer) }
155-
ensure_connected{ |socket| socket.write(buffer.to_s) }
156-
end
157131
end
158132
end
159133
end

0 commit comments

Comments
 (0)