We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents e3ff748 + b1eec43 commit a37cc08Copy full SHA for a37cc08
lib/net/ldap/connection.rb
@@ -690,7 +690,7 @@ def delete(args)
690
#
691
# Typically a TCPSocket, but can be a OpenSSL::SSL::SSLSocket
692
def socket
693
- return @conn if defined? @conn
+ return @conn if defined?(@conn) && !@conn.nil?
694
695
# First refactoring uses the existing methods open_connection and
696
# prepare_socket to set @conn. Next cleanup would centralize connection
0 commit comments