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

[SITL] fix race condition in serial_tcp.c #9043

Merged
merged 1 commit into from
May 8, 2023

Conversation

stronnag
Copy link
Collaborator

@stronnag stronnag commented May 8, 2023

There existed a race condition in serial_tcp.c where the unit static variable tcpThreadRunning could be read by a TCP reader thread before it was set in the main thread. The result (only seen on kvm virtualised Windows) being that the socket appeared bound, but a client could not interact with it.

As the variable serves no useful purpose, remove it and the race condition.

@stronnag stronnag merged commit 572b223 into release_6.1.0 May 8, 2023
@stronnag stronnag deleted the jh_fix_serial_tcp_race branch May 8, 2023 12:09
sensei-hacker pushed a commit to sensei-hacker/inav_unofficial_targets that referenced this pull request Oct 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant