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

Errors: Ignore errors from async when quitting #1918

Merged

Commits on Nov 12, 2022

  1. utils/errors: Fix function order in to_anyhow

    impl for `SendError`. Previously we attached the context to `anyhow!`,
    which is wrong (because it doesn't create an `Err` type itself) and
    leads to strange behavior where the error seemingly is immediately
    panicked upon.
    
    Instead, Wrap `anyhow!` into an `Err()` and then attach the context to
    that. This achieves the intended goal and doesn't lead to premature
    termination.
    har7an committed Nov 12, 2022
    Configuration menu
    Copy the full SHA
    d6d21da View commit details
    Browse the repository at this point in the history
  2. server/terminal_bytes: Ignore error in listen

    which occurs when quitting zellij with the `Ctrl+q` keybinding. At the
    end of the `listen` function we break out of a loop and send a final
    `Render` instruction to the Screen. However, when quitting zellij as
    mentioned above, the Screen thread is likely dead already and hence we
    cannot send it any Instructions. This causes an error in the async tasks
    of the panes that handle reading the PTY input.
    
    If we leave the error unhandled, we will have error messages in the log
    whenever we quit zellij, even though the application exited normally.
    Hence, we now send the final `Render` instruction but do not care
    whether it is sent successfully or not.
    
    This is a "workaround" for the fact that we cannot tell whether the
    application is quitting or not.
    har7an committed Nov 12, 2022
    Configuration menu
    Copy the full SHA
    8eac3d6 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    3d0b631 View commit details
    Browse the repository at this point in the history
  4. changelog: Add PR zellij-org#1918

    don't log errors from async pane threads when quitting zellij
    har7an committed Nov 12, 2022
    Configuration menu
    Copy the full SHA
    9727945 View commit details
    Browse the repository at this point in the history