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

wait certain time when send data in mac os #191

Merged
merged 2 commits into from
Sep 29, 2023

Conversation

24seconds
Copy link
Owner

Description

There is a bug in rust-cli-pomodoro in mac os. When the number of deleted notifications are large, calling command history in ipc mode makes error.

Bug reproduce

  1. Prepare two terminal tabs, let say terminal A and terminal B.
  2. Run rust-cli-pomodoro app in terminal A.
  3. Run pomodoro q -d 20 times in terminal B.
  4. Run pomodoro history in terminal B.
  5. You will see the error message
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 55, kind: Uncategorized, message: "No buffer space available" }'

Solution

According to the stackoverflow about this error, it says

On BSD systems sendto NEVER blocks, the docs are wrong. Mixed with some OSX specific problem when connected to high speed lans. Overall: Just don't think that sendto blocks, it doesn't on BSD. The good thing: If you know that, you can take this into account.

So I think maybe waiting for certain time can solve this problem and tried and it worked.

@24seconds 24seconds added the bug Something isn't working label Sep 29, 2023
@24seconds 24seconds self-assigned this Sep 29, 2023
@24seconds 24seconds merged commit 5ba7d40 into main Sep 29, 2023
3 checks passed
@24seconds 24seconds deleted the fix_long_history_problem_in_mac_os branch September 29, 2023 13:54
@24seconds 24seconds linked an issue Sep 30, 2023 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] history command via IPC returns error in MacOS
1 participant