Skip to content
This repository has been archived by the owner on Aug 29, 2024. It is now read-only.

Commit

Permalink
May be native IO. Don't try to clear reactor.
Browse files Browse the repository at this point in the history
  • Loading branch information
ioquatix committed Apr 23, 2024
1 parent 268c0b5 commit 7d5657b
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions lib/async/io/shared_endpoint.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@ def self.bound(endpoint, backlog: Socket::SOMAXCONN, close_on_exec: false, **opt
end

server.close_on_exec = close_on_exec
server.reactor = nil

if server.respond_to?(:reactor=)
server.reactor = nil
end
end

return self.new(endpoint, wrappers)
Expand All @@ -35,7 +38,10 @@ def self.connected(endpoint, close_on_exec: false)
wrapper = endpoint.connect

wrapper.close_on_exec = close_on_exec
wrapper.reactor = nil

if wrapper.respond_to?(:reactor=)
wrapper.reactor = nil
end

return self.new(endpoint, [wrapper])
end
Expand Down

0 comments on commit 7d5657b

Please sign in to comment.