Skip to content
Snippets Groups Projects
Commit f84e410e authored by dkirov's avatar dkirov
Browse files

plug_idle can have readable and writable False

in this case we wait only for close events
parent 7576bb4f
No related branches found
No related tags found
No related merge requests found
......@@ -97,12 +97,15 @@ class IdleQueue:
self.queue[obj.fd] = obj
if writable:
if not readable:
flags = 4 # read only
flags = 20 # write only
else:
flags = 7 # both readable and writable
flags = 23 # both readable and writable
else:
flags = 3 # write only
flags |= 16 # hung up, closed channel
if readable:
flags = 19 # read only
else:
# when we paused a FT, we expect only a close event
flags = 16
self.add_idle(obj.fd, flags)
def add_idle(self, fd, flags):
......
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