Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
proton-c-0.39.0
-
None
Description
In writing a new threaderciser for raw connections the following scenario can result in a state machine mixup and second disconnect.
If a pn_raw_connection_wake() occurs around the time that the first disconnect event is being consumed the task may be added to the global ready list for processing. The batch done() processing will (correctly) defer the task cleanup until the task is next scheduled via the ready list. However the raw connection forgets that it has already done the disconnect and restarts the state machine at the first disconnect stage, resulting in the second disconnect event.