Signed-off-by: YAMAMOTO Takashi <[email protected]>
---
ryu/contrib/ovs/poller.py | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/ryu/contrib/ovs/poller.py b/ryu/contrib/ovs/poller.py
index 7d15f3e..ffd6a39 100644
--- a/ryu/contrib/ovs/poller.py
+++ b/ryu/contrib/ovs/poller.py
@@ -18,6 +18,15 @@ import ovs.vlog
import select
import socket
+try:
+ import eventlet.patcher
+
+ def _using_eventlet_green_select():
+ return eventlet.patcher.is_monkey_patched(select)
+except:
+ def _using_eventlet_green_select():
+ return False
+
vlog = ovs.vlog.Vlog("poller")
POLLIN = 0x001
@@ -59,6 +68,10 @@ class _SelectSelect(object):
timeout = None
else:
timeout = float(timeout) / 1000
+ # XXX workaround a bug in eventlet
+ # see https://github.com/eventlet/eventlet/pull/25
+ if timeout == 0 and _using_eventlet_green_select():
+ timeout = 0.1
rlist, wlist, xlist = select.select(self.rlist, self.wlist, self.xlist,
timeout)
--
1.8.0.1
------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel