Skip to content

Resolve "AsyncIO crashes with a segfault if onConnect returns an Error"

What does this MR do?

Fixes handling of errors in onConnect and onShareChange.

  • if onShareChange produces an error, a refresh event is sent. This event is not handled properly because the timeout is determined before the event is queued. If the timeout was infinity, the event is never handled. This MR changes the order so that the timeout determination takes into account refresh events queued from the onShareChange or onDestroy handlers.
  • handleIOConnection does not close the connection anymore. All handlers call asyncio's handlers with close=True anyway (except onSharedChange, but this closes the connection manually). This fixes double closing of connections.

Related issues

Closes #555 (closed)

Changes to public APIs

n.a.

Author's checklist (required)

See CONTRIBUTING.md for the rationale behind these items:

  • The commit history does not contain merges (use git rebase -i master if it does)
  • Intermediate commits compile (use git rebase -i master if not)
  • Newly added code follows the Platform code style
  • Newly added code is documented
  • If bugs have been solved, tests have been added
  • Appropriate types have been used, especially in APIs
  • If efficiency is part of the acceptance criteria of the issue, a benchmark is provided
  • A changelog entry has been added if required. See CONTRIBUTING.md
Edited by Mart Lubbers

Merge request reports