Skip to content

Commit

Permalink
Catch 'Error in reactor loop escaped: mode not supported for this obj…
Browse files Browse the repository at this point in the history
…ect: r' (puma#2477)

The following error happens intermittently in non MRI CI:

Error in reactor loop escaped: mode not supported for this object: r (ArgumentError)

Add rescue in `Reactor#register
  • Loading branch information
MSP-Greg authored Nov 16, 2020
1 parent dcfe627 commit ae01730
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions History.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

* Bugfixes
* Your bugfix goes here <Most recent on the top, like GitHub> (#Github Number)
* Catch 'Error in reactor loop escaped: mode not supported for this object: r' (#2477)
* Ignore Rails' reaper thread (and any thread marked forksafe) for warning ([#2475])
* Ignore illegal (by Rack spec) response header ([#2439])
* Close idle connections immediately on shutdown ([#2460])
Expand Down
2 changes: 2 additions & 0 deletions lib/puma/reactor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ def select_loop
def register(client)
@selector.register(client.to_io, :r).value = client
@timeouts << client
rescue ArgumentError
# unreadable clients raise error when processed by NIO
end

# 'Wake up' a monitored object by calling the provided block.
Expand Down

0 comments on commit ae01730

Please sign in to comment.