lib/socketry/ssl/socket.rb in socketry-0.5.0 vs lib/socketry/ssl/socket.rb in socketry-0.5.1
- old
+ new
@@ -161,11 +161,13 @@
# Close the socket
#
# @return [true, false] true if the socket was open, false if closed
def close
- @ssl_socket.close rescue nil
- super
+ return false unless super
+ @ssl_socket.close
+ @ssl_socket = nil
+ true
end
private
# Perform a non-blocking I/O operation