Skip to content

Commit

Permalink
Merge pull request #3 from mishina2228/fix-timeout
Browse files Browse the repository at this point in the history
Use Timeout.timeout instead of Object#timeout
  • Loading branch information
c1n1c authored May 2, 2023
2 parents 2b78b53 + 67c7f9b commit 0c2caab
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 0c2caab

Please sign in to comment.