Opened 10 years ago

Last modified 10 years ago

#4604 task new

Try using POLLHUP and POLLERR information to decide between ConnectionDone and ConnectionLost in

Reported by: Jean-Paul Calderone Owned by:
Priority: normal Milestone:
Component: core Keywords:
Cc: Branch:


Currently the poll-like reactors use a puzzling heuristic based on HUP|ERR & ~IN and the state of the _reads dictionary to decide if a connection was lost cleanly or uncleanly.

This seems to be a trick inherited from how select reactor needs to be implemented. It's probably true that all of the poll-like reactors have enough information to make this decision more cleanly (was it HUP or was it ERR?). But someone will need to check to make sure this applies to all platforms and file descriptor types.

This came up in the review of #4539, when no one could come up with a good explanation for the way the poll-like reactors are implemented currently.

Change History (2)

comment:1 Changed 10 years ago by Jean-Paul Calderone

foom pointed out which is probably helpful in figuring this out.

comment:2 Changed 9 years ago by <automation>

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