fix(gui-client/linux): show a specific error message in the GUI when updating#5848
fix(gui-client/linux): show a specific error message in the GUI when updating#5848ReactorScram merged 49 commits intomainfrom
Conversation
…to feat/tauri-set-icon
…icon Signed-off-by: Reactor Scram <ReactorScram@users.noreply.github.com>
…updating Closes #5790 (we could do more, but this might be sufficient) The code is cross-platform, but this is unlikely to happen on Windows because the MSI refuses to update if the GUI process is running. On Linux `apt-get` will update and restart the IPC service without touching the GUI process.
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Skipped Deployment
|
Terraform Cloud Plan Output |
Signed-off-by: Reactor Scram <ReactorScram@users.noreply.github.com>
Performance Test ResultsTCP
UDP
|
Signed-off-by: Reactor Scram <ReactorScram@users.noreply.github.com>
thomaseizinger
left a comment
There was a problem hiding this comment.
Nice work! Left some food for thought :)
| loop { | ||
| Handler::new(&mut server).await?.run().await; | ||
| let mut handler_fut = pin!(Handler::new(&mut server)); | ||
| let Some(handler) = poll_fn(|cx| { |
There was a problem hiding this comment.
A lot of nesting going on here. Could this be simpler if we used a select() instead and matched on the Either?
There was a problem hiding this comment.
It would take fewer lines, I just don't like how the Either::Left((thing_i_want, _future_i_always_drop)) looks
| continue; | ||
| let event = poll_fn(|cx| { | ||
| if let Poll::Ready(()) = signals.poll_recv(cx) { | ||
| // `recv` on signals is cancel-safe. |
There was a problem hiding this comment.
Typically, when you use poll fns, you don't need to worry about cancel safety unless you constructed a future and are carrying it around as a value but then it is obvious anyway that you are dropping data here.
| if let Poll::Ready(()) = signals.poll_recv(cx) { | ||
| // `recv` on signals is cancel-safe. | ||
| Poll::Ready(Event::Terminate) | ||
| } else if let Poll::Ready(result) = pin!(&mut self.ipc_rx).poll_next(cx) { |
There was a problem hiding this comment.
For complex return types from a poll like this, I typically match right away so there is only one layer of pattern matching.
There was a problem hiding this comment.
Yeah! The lines are long but the benefit is that the compiler makes an exhaustiveness check for you so you can glance over it in most cases.

Closes #5790 (we could do more, but this might be sufficient)
The code is cross-platform, but this is unlikely to happen on Windows because the MSI refuses to update if the GUI process is running. On Linux
apt-getwill update and restart the IPC service without touching the GUI process.