Skip to content

Commit

Permalink
Trying to fix timeout method call
Browse files Browse the repository at this point in the history
 Trying to fix timeout method call as it is now Timeout::timeout(sec){}
  • Loading branch information
praveenkumarsinha authored Jan 11, 2022
1 parent 92c06aa commit 5a20308
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 5a20308

Please sign in to comment.