Permalink
Browse files

ip address variable

  • Loading branch information...
Elad Meidar
Elad Meidar committed Apr 23, 2011
1 parent 9c50348 commit 975db5555aa05c723415d7ba598c90a8e087d6e1
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/rack/contrib/deflect.rb
@@ -1,5 +1,5 @@
require 'thread'
-
+require 'socket'
# TODO: optional stats
# TODO: performance
# TODO: clean up tests
@@ -102,7 +102,7 @@ def watch
def block!
return if blocked?
log "blocked #{@remote_addr}"
- Notifier.deliver_ip_blocked(ip_address, Socket.gethostname, map[:request_uris])
+ Notifier.deliver_ip_blocked(@remote_addr, Socket.gethostname, map[:request_uris])
map[:block_expires] = Time.now + options[:block_duration]
end

0 comments on commit 975db55

Please sign in to comment.