Skip to content
Snippets Groups Projects
Commit 1bbb42a9 authored by Yann Leboulanger's avatar Yann Leboulanger
Browse files

handle read event before close event in case pipe sends us something and close...

handle read event before close event in case pipe sends us something and close pipe in the same time.
parent 359a6e90
No related branches found
No related tags found
No related merge requests found
......@@ -388,6 +388,16 @@ class IdleQueue:
self.unplug_idle(fd)
return False
read_write = False
if flags & PENDING_READ:
#print 'waiting read on %d, flags are %d' % (fd, flags)
obj.pollin()
read_write = True
elif flags & PENDING_WRITE and not flags & IS_CLOSED:
obj.pollout()
read_write = True
if flags & IS_CLOSED:
# io error, don't expect more events
self.remove_timeout(obj.fd)
......@@ -395,15 +405,8 @@ class IdleQueue:
obj.pollend()
return False
if flags & PENDING_READ:
#print 'waiting read on %d, flags are %d' % (fd, flags)
obj.pollin()
return True
if flags & PENDING_WRITE:
obj.pollout()
if read_write:
return True
return False
def process(self):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment