Skip to content

Commit b1eec43

Browse files
author
Kanika Gupta
committed
fix for undefined method for write exception
Date: Mon Nov 23 16:27:38 2020 +0530 Committer: Kanika Gupta <[email protected]>
1 parent e3ff748 commit b1eec43

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/net/ldap/connection.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -690,7 +690,7 @@ def delete(args)
690690
#
691691
# Typically a TCPSocket, but can be a OpenSSL::SSL::SSLSocket
692692
def socket
693-
return @conn if defined? @conn
693+
return @conn if defined?(@conn) && !@conn.nil?
694694

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

0 commit comments

Comments
 (0)