Skip to content

Commit

Permalink
Merge pull request #383 from railsstarter/topic/fix_for_undefined_met…
Browse files Browse the repository at this point in the history
…hod_write_for_nilclass

fix for undefined method for write exception
  • Loading branch information
HarlemSquirrel committed Nov 30, 2020
2 parents e3ff748 + b1eec43 commit a37cc08
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/net/ldap/connection.rb
Original file line number Diff line number Diff line change
Expand Up @@ -690,7 +690,7 @@ def delete(args)
#
# Typically a TCPSocket, but can be a OpenSSL::SSL::SSLSocket
def socket
return @conn if defined? @conn
return @conn if defined?(@conn) && !@conn.nil?

# First refactoring uses the existing methods open_connection and
# prepare_socket to set @conn. Next cleanup would centralize connection
Expand Down

0 comments on commit a37cc08

Please sign in to comment.