Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
proton-0.15.0, proton-0.16.0
-
None
Description
With a server (listener) test class and a client test class, I'm able to disconnect the client such that occasionally on the server the TRANSPORT_ERROR and TRANSPORT_TAIL_CLOSED events fire but TRANSPORT_HEAD_CLOSED and TRANSPORT_CLOSED do not. A timer selectable running to keep the reactor alive then causes repeated TRANSPORT events that all report -1 pending and isClosed == true. This goes on forever.
In the good case, the global event logger sequence is:
TRANSPORT_ERROR
TRANSPORT_TAIL_CLOSED
SELECTABLE_UPDATED
REACTOR_QUIESCED
TRANSPORT_HEAD_CLOSED
TRANSPORT_CLOSED
SELECTABLE_FINAL
CONNECTION_UNBOUND
TRANSPORT
And in the bad case:
TRANSPORT_ERROR
TRANSPORT_TAIL_CLOSED
SELECTABLE_UPDATED
REACTOR_QUIESCED
SELECTABLE_FINAL
REACTOR_QUIESCED
SELECTABLE_UPDATED
TRANSPORT
REACTOR_QUIESCED
SELECTABLE_UPDATED
TRANSPORT
... etc.
Digging around with the debugger I verified that no selectables were writable in the IOHandler and TransportImpl's pop() was never being called when the output pending was -1.