Opened 10 years ago

Closed 10 years ago

#2814 defect closed duplicate (duplicate)

bugfix in epollreactor.py: sometime event cann't be identified when connection is lost

Reported by: huyx Owned by:
Priority: normal Milestone:
Component: core Keywords:
Cc: Branch:
Author:

Description

call loseConnection, if at the just same time, some data is not sent, a _epoll.HUP and _epoll.ERR is set, event == 24

but _doReadOrWrite cann't catch the event. and in my computer, it cause a 100% cpu consume!

I thank this patch may resolved this problem:

--- epollreactor.py.orig        2007-09-06 09:54:28.000000000 +0800
+++ epollreactor.py     2007-09-06 09:53:53.000000000 +0800
@@ -211,7 +211,7 @@
         """
         why = None
         inRead = False
-        if event in (_epoll.HUP, _epoll.ERR):
+        if event & _epoll.HUP or event & _epoll.ERR:
             why = CONNECTION_LOST
         else:
             try:

Change History (2)

comment:1 Changed 10 years ago by therve

Resolution: duplicate
Status: newclosed

Duplicate of #2809

comment:2 Changed 7 years ago by <automation>

Owner: Glyph deleted
Note: See TracTickets for help on using tickets.