fraggle 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/fraggle/client.rb +8 -7
- metadata +2 -2
data/lib/fraggle/client.rb
CHANGED
@@ -266,18 +266,19 @@ module Fraggle
|
|
266
266
|
end
|
267
267
|
else
|
268
268
|
get 0, "/doozer/info/#{e.value}/public-addr" do |a|
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
269
|
+
addr = a.value.to_s
|
270
|
+
if @shun.has_key?(addr)
|
271
|
+
if (n = Time.now - @shun[addr]) > 3
|
272
|
+
info "pardoning #{addr} after #{n} secs"
|
273
|
+
@shun.delete(addr)
|
273
274
|
else
|
274
|
-
info "ignoring shunned addr #{
|
275
|
+
info "ignoring shunned addr #{addr}"
|
275
276
|
next
|
276
277
|
end
|
277
278
|
end
|
278
279
|
# TODO: Be defensive and check the addr value is valid
|
279
|
-
@addrs[e.path] =
|
280
|
-
info("added #{e.path} addr #{
|
280
|
+
@addrs[e.path] = addr
|
281
|
+
info("added #{e.path} addr #{addr}")
|
281
282
|
end
|
282
283
|
end
|
283
284
|
end
|