lib/async/io/ssl_socket.rb in async-io-1.8.1 vs lib/async/io/ssl_socket.rb in async-io-1.8.2

- old
+ new

@@ -71,13 +71,13 @@ def remote_address @io.to_io.remote_address end def self.wrap(socket, context) - io = @wrapped_klass.new(socket.to_io, context) - # We detach the socket from the reactor, otherwise it's possible to add the file descriptor to the selector twice, which is bad. socket.reactor = nil + + io = @wrapped_klass.new(socket.to_io, context) # This ensures that when the internal IO is closed, it also closes the internal socket: io.sync_close = true return self.new(io, socket.reactor)