Skip to content

Commit

Permalink
Fix timeout exception caused by Ruby version > 3.0.2; mojombo#262
Browse files Browse the repository at this point in the history
  • Loading branch information
stanimal committed Jul 4, 2023
1 parent 92c06aa commit 4e784a2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/god/system/slash_proc_poller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def percent_cpu
# read from them. Try to use this sparingly as it is expensive.
def self.readable?(path)
begin
timeout(1) { File.read(path) }
Timeout.timeout(1) { File.read(path) }
rescue Timeout::Error
false
end
Expand Down

0 comments on commit 4e784a2

Please sign in to comment.