Permalink
Browse files

Fixed TypeError when nothing collected

  • Loading branch information...
1 parent e16894e commit 74412905f51072fb2f676504ecbb7c70c62d003d @srozum srozum committed Apr 7, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 nginx_report/plugin.rb
View
2 nginx_report/plugin.rb
@@ -21,7 +21,7 @@ def build_report
if line =~ /^\s+(\d+)\s+(\d+)\s+(\d+)/
current_requests = $3.to_i
- last_requests = memory(:requests) || current_requests
+ last_requests = (memory(:requests) || current_requests).to_i
# handle nginx stats reset
current_requests = last_requests + current_requests if ( last_requests > current_requests )
remember(:requests, current_requests)

0 comments on commit 7441290

Please sign in to comment.