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

VisionIpc: fix exception if server is killed while client is getting streams #638

Merged
merged 3 commits into from
Dec 17, 2024

Conversation

sshane
Copy link
Contributor

@sshane sshane commented Dec 17, 2024

Fixes a ui crash in openpilot when ignition is rapidly cycled from off to on to off. The first assertion always passes (due to timing?), but the second can sometimes return -1.

This return code comes from this line where the errno is always 104 (ECONNRESET):

int r = recvmsg(fd, &msg, 0);
if (r < 0) return r;

@sshane sshane requested a review from adeebshihadeh December 17, 2024 07:07
@sshane
Copy link
Contributor Author

sshane commented Dec 17, 2024

This fixes the two assertions when cycling ignition quickly, which is a subset of: #624

TODO: try to repro the other issues

@sshane sshane closed this Dec 17, 2024
@sshane sshane deleted the sshane-patch-1 branch December 17, 2024 07:09
@sshane sshane restored the sshane-patch-1 branch December 17, 2024 21:08
@sshane sshane reopened this Dec 17, 2024
@sshane sshane merged commit 5bb86f8 into master Dec 17, 2024
32 checks passed
@sshane sshane deleted the sshane-patch-1 branch December 17, 2024 21:11
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