We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d5e6afd commit 4a415bcCopy full SHA for 4a415bc
lib/net/ldap/connection.rb
@@ -606,6 +606,13 @@ def socket
606
# First refactoring uses the existing methods open_connection and
607
# prepare_socket to set @conn. Next cleanup would centralize connection
608
# handling here.
609
- open_connection(@server)
+ if @server[:socket]
610
+ prepare_socket(@server)
611
+ else
612
+ @server[:hosts] = [[@server[:host], @server[:port]]] if @server[:hosts].nil?
613
+ open_connection(@server)
614
+ end
615
+
616
+ @conn
617
end
618
end # class Connection
0 commit comments