Skip to content

[core] Fixed the behavior and error code returned by srt_accept_bond#3335

Open
ethouris wants to merge 3 commits into
Haivision:masterfrom
ethouris:dev-fix-accept-bond
Open

[core] Fixed the behavior and error code returned by srt_accept_bond#3335
ethouris wants to merge 3 commits into
Haivision:masterfrom
ethouris:dev-fix-accept-bond

Conversation

@ethouris

Copy link
Copy Markdown
Collaborator

The function srt_accept_bond was propagating errors from internals and the internals were also unexpectedly reporting errors.

The fix:

  • prevent any internals reporting errors through exceptions
  • throw exception of known error code at the right place

The result is that in the new test case one of three errors can be potentially be a result from srt_accept_bond:

  • SRT_EINVSOCK: if the listener socket was closed a long ago before calling srt_accept_bond (any from the list)
  • SRT_ESCLOSED: if the listener socket was closed just at the moment when calling srt_accept_bond (or it was underway for being closed, but the closing action hasn't finalized yet)
  • SRT_EASYNCRCV: if the listener socket wasn't yet recognized as closed, but the accept queue has been already cleared

@ethouris ethouris added this to the v1.5.6 milestone Jun 17, 2026
@ethouris ethouris added Type: Bug Indicates an unexpected problem or unintended behavior [core] Area: Changes in SRT library core labels Jun 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[core] Area: Changes in SRT library core Type: Bug Indicates an unexpected problem or unintended behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant