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: thread poisoning #240

Merged
merged 4 commits into from
Mar 4, 2023
Merged

fix: thread poisoning #240

merged 4 commits into from
Mar 4, 2023

Conversation

darkskygit
Copy link
Member

this may cause the sync thread to crash

@darkskygit darkskygit temporarily deployed to development March 4, 2023 11:09 — with GitHub Actions Inactive
@darkskygit darkskygit temporarily deployed to development March 4, 2023 11:09 — with GitHub Actions Inactive
@darkskygit darkskygit merged commit edb3f2c into master Mar 4, 2023
@darkskygit darkskygit deleted the fix/thread-poisoning branch March 4, 2023 11:10
Comment on lines +295 to +304
for msg in MessageReader::new(&mut decoder) {
if let Ok(msg) = msg {
let mut awareness = self.awareness.write().unwrap();
if let Ok(Ok(Some(msg))) = catch_unwind(AssertUnwindSafe(|| {
Self::sync_handle_message(&mut awareness, msg)
})) {
result.push(msg.encode_v1());
}
}
}

Check warning

Code scanning / clippy

unnecessary `if let` since only the `Ok` variant of the iterator element is used

unnecessary `if let` since only the `Ok` variant of the iterator element is used
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

1 participant