lib/and-son/connection.rb in and-son-0.1.1 vs lib/and-son/connection.rb in and-son-0.2.1
- old
+ new
@@ -10,10 +10,10 @@
def open
protocol_connection = Sanford::Protocol::Connection.new(tcp_socket)
yield protocol_connection if block_given?
ensure
- protocol_connection.close
+ protocol_connection.close if protocol_connection
end
private
# TCP_NODELAY is set to disable buffering. In the case of Sanford