From db1bf842e6f297ec7bb9036baf8fc70aaf733852 Mon Sep 17 00:00:00 2001 From: Zealot Date: Fri, 13 Feb 2015 16:17:24 +0800 Subject: [PATCH] Fix request hangs If the handler is blocked by any flow action waiting for the barrier reply, and the receive queue is flooded with other messages, the barrier reply may not be queued then the handler will be blocked forever. Changes the queue to infinite size will fix the problem. --- ryu/base/app_manager.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ryu/base/app_manager.py b/ryu/base/app_manager.py index c28ed74a7..115d654a9 100644 --- a/ryu/base/app_manager.py +++ b/ryu/base/app_manager.py @@ -154,7 +154,7 @@ def __init__(self, *_args, **_kwargs): self.event_handlers = {} # ev_cls -> handlers:list self.observers = {} # ev_cls -> observer-name -> states:set self.threads = [] - self.events = hub.Queue(128) + self.events = hub.Queue(-1) if hasattr(self.__class__, 'LOGGER_NAME'): self.logger = logging.getLogger(self.__class__.LOGGER_NAME) else: