Commit 45be8a5a authored by Denis Bilenko's avatar Denis Bilenko

Use write-only event for connections on non-windows systems (issue #31)....

Use write-only event for connections on non-windows systems (issue #31). Thanks to Alexey Borzenkov for figuring it out.
parent 20f59181
......@@ -292,7 +292,12 @@ class socket(object):
self._sock.setblocking(0)
self._read_event = core.event(core.EV_READ, self.fileno(), _wait_helper)
self._write_event = core.event(core.EV_WRITE, self.fileno(), _wait_helper)
self._rw_event = core.event(core.EV_READ | core.EV_WRITE, self.fileno(), _wait_helper)
# regarding the following, see issue #31
# (http://code.google.com/p/gevent/issues/detail?id=31#c19)
if is_windows:
self._rw_event = core.event(core.EV_READ | core.EV_WRITE, self.fileno(), _wait_helper)
else:
self._rw_event = core.event(core.EV_WRITE, self.fileno(), _wait_helper)
def __repr__(self):
return '<%s at %s %s>' % (type(self).__name__, hex(id(self)), self._formatinfo())
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment