lib/grumlin/request_dispatcher.rb in grumlin-0.6.2 vs lib/grumlin/request_dispatcher.rb in grumlin-0.7.0
- old
+ new
@@ -20,10 +20,12 @@
401 => ClientSideError,
407 => ClientSideError,
498 => ClientSideError
}.freeze
+ include Console
+
def initialize
@requests = {}
end
def add_request(request)
@@ -65,9 +67,13 @@
request[:channel].close
end
def ongoing_request?(request_id)
@requests.key?(request_id)
+ end
+
+ def clear
+ @requests.clear
end
private
def check_errors!(status)