Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix extra ack being sent after a connection is established #2832

Merged
merged 8 commits into from
Dec 20, 2023

Conversation

yomnes0
Copy link
Collaborator

@yomnes0 yomnes0 commented Dec 11, 2023

Add an initialization of m_bBufferWasFull to false when starting a connection. This will prevent an extra ack from being sent right after the handshake.

Fixes #2829.

Add an initialization of m_bBufferWasFull to false when starting a connection
srtcore/core.h Outdated Show resolved Hide resolved
@ethouris
Copy link
Collaborator

Ah, forgot one thing: if you set this to true in startConnect, shouldn't it be also the same way initialized when accepted out of the listener?

@yomnes0
Copy link
Collaborator Author

yomnes0 commented Dec 11, 2023

That's true, I was focusing on the issue on the transmitter side and forgot about the receiver

@maxsharabayko
Copy link
Collaborator

maxsharabayko commented Dec 11, 2023

@yomnes0 Could you please nae PRs and commit message describing what is changed/fixed. This lands in the commit message. "Fix for bug #2829" tells nothing, except for the need to go to GitHub to find the issue and figure out what's fixed.

@maxsharabayko maxsharabayko added this to the v1.6.0 milestone Dec 11, 2023
@maxsharabayko maxsharabayko added Type: Bug Indicates an unexpected problem or unintended behavior [core] Area: Changes in SRT library core labels Dec 11, 2023
@yomnes0 yomnes0 changed the title Fix for bug #2829 Fix extra ack being sent after a connection is established Dec 11, 2023
Copy link
Collaborator

@maxsharabayko maxsharabayko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The startConnect function is used by a caller (and probably by a rendezvous), but not by a listener. The variable stays uninitialized for a listener.
@yomnes0 please use the common place for initialization where all other CUDT member variables are initialized.

srtcore/core.cpp Outdated Show resolved Hide resolved
Co-authored-by: Maxim Sharabayko <maxlovic@gmail.com>
@maxsharabayko maxsharabayko merged commit 79ab5f5 into Haivision:master Dec 20, 2023
8 of 10 checks passed
maxsharabayko pushed a commit to maxsharabayko/srt that referenced this pull request Apr 26, 2024
maxsharabayko pushed a commit to maxsharabayko/srt that referenced this pull request Apr 26, 2024
maxsharabayko pushed a commit that referenced this pull request Apr 29, 2024
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.

[BUG] Extra ACK is sent at the start of a connection (due to an uninitialized variable)
3 participants