net-ldap version: 0.16.0
Problem: While doing socket.write at https://github.com/ruby-ldap/ruby-net-ldap/blob/release-0.16.0/lib/net/ldap/connection.rb#L261 fails with exception: "undefined method `write' for nil:NilClass"
Looking at the error, it seems that socket from https://github.com/ruby-ldap/ruby-net-ldap/blob/release-0.16.0/lib/net/ldap/connection.rb#L688 is coming as nil.