Skip to content

Exception handling in dialog.send() #44

Description

@raphaelm

From dialog.py:

        # assert response.segments[0].message_number == self.next_message_number[response.DIRECTION]
        # FIXME Better handling of HKEND in exception case
        self.messages[response.DIRECTION][response.segments[0].message_number] = response
        self.next_message_number[response.DIRECTION] += 1

From @henryk in PR #34:

The one in dialog.py:send() is more of a note to self. Previously the assert was a sanity check on received/expected message sequence numbers (and prevents message processing out of order). However, an exception during processing would exit the context handler, would close the dialog, would send() a HKEND message, which would then seem out of order. I'm not sure how to properly[tm] address it: Find the right invariant that is reentrancy safe, or ignore HKEND messages, or skip checks in exception context, or something else.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions