Commit aba27dd6 authored by Josiah Carlson's avatar Josiah Carlson

Made handle_expt_event() be called last, so that we don't accidentally read

after closing the socket.
parent bcd64a3f
......@@ -97,14 +97,14 @@ def _exception(obj):
def readwrite(obj, flags):
try:
if flags & select.POLLPRI:
obj.handle_expt_event()
if flags & select.POLLIN:
obj.handle_read_event()
if flags & select.POLLOUT:
obj.handle_write_event()
if flags & (select.POLLHUP | select.POLLERR | select.POLLNVAL):
obj.handle_close()
if flags & select.POLLPRI:
obj.handle_expt_event()
except _reraised_exceptions:
raise
except:
......
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