Skip to content

Commit 70cb1f9

Browse files
committed
Accept message_id as param to write
1 parent 49fd5c9 commit 70cb1f9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/net/ldap/connection.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,9 +146,9 @@ def read(syntax = Net::LDAP::AsnSyntax)
146146
#
147147
# Returns the return value from writing to the connection, which in some
148148
# cases is the Integer number of bytes written to the socket.
149-
def write(request, controls = nil)
149+
def write(request, controls = nil, message_id = next_msgid)
150150
instrument "write.net_ldap_connection" do |payload|
151-
packet = [next_msgid.to_ber, request, controls].compact.to_ber_sequence
151+
packet = [message_id.to_ber, request, controls].compact.to_ber_sequence
152152
payload[:content_length] = @conn.write(packet)
153153
end
154154
end

0 commit comments

Comments
 (0)