Permalink
Browse files

Don't log when `t1` wasn't set

  • Loading branch information...
1 parent 578c01f commit d781aa4e00577f5fbdfcc5855df155cf16c5998f @pietern pietern committed Mar 13, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/redis/client.rb
View
@@ -226,7 +226,7 @@ def logging(commands)
t1 = Time.now
yield
ensure
- @logger.debug("Redis >> %0.2fms" % ((Time.now - t1) * 1000))
+ @logger.debug("Redis >> %0.2fms" % ((Time.now - t1) * 1000)) if t1
end
end

0 comments on commit d781aa4

Please sign in to comment.