Skip to content

Commit

Permalink
Uses timeout from Timeout.timeout instead from Object
Browse files Browse the repository at this point in the history
Fixes issue
mojombo#262
  • Loading branch information
heridev committed Oct 27, 2023
1 parent 92c06aa commit b838a96
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 b838a96

Please sign in to comment.