Made handle_expt_event() be called last, so that we don't accidentally read
after closing the socket.
This commit is contained in:
parent
bcd64a3fc7
commit
aba27dd6d9
|
@ -97,14 +97,14 @@ def _exception(obj):
|
||||||
|
|
||||||
def readwrite(obj, flags):
|
def readwrite(obj, flags):
|
||||||
try:
|
try:
|
||||||
if flags & select.POLLPRI:
|
|
||||||
obj.handle_expt_event()
|
|
||||||
if flags & select.POLLIN:
|
if flags & select.POLLIN:
|
||||||
obj.handle_read_event()
|
obj.handle_read_event()
|
||||||
if flags & select.POLLOUT:
|
if flags & select.POLLOUT:
|
||||||
obj.handle_write_event()
|
obj.handle_write_event()
|
||||||
if flags & (select.POLLHUP | select.POLLERR | select.POLLNVAL):
|
if flags & (select.POLLHUP | select.POLLERR | select.POLLNVAL):
|
||||||
obj.handle_close()
|
obj.handle_close()
|
||||||
|
if flags & select.POLLPRI:
|
||||||
|
obj.handle_expt_event()
|
||||||
except _reraised_exceptions:
|
except _reraised_exceptions:
|
||||||
raise
|
raise
|
||||||
except:
|
except:
|
||||||
|
|
Loading…
Reference in New Issue