canonical / multipass

Multipass orchestrates virtual Ubuntu instances
https://multipass.run
GNU General Public License v3.0
7.76k stars 642 forks source link

Shutdown grpc server before quitting the Qt event loop #3448

Closed andrei-toterman closed 6 months ago

andrei-toterman commented 6 months ago

If the Qt event loop exited before the gRPC server was done processing ongoing requests, the gRPC server became stuck. This PR makes sure that before we actually quit the Qt event loop, we tell the gRPC server to shut down and wait until it is done with what it was doing.

codecov[bot] commented 6 months ago

Codecov Report

Attention: Patch coverage is 0% with 5 lines in your changes are missing coverage. Please review.

Project coverage is 88.65%. Comparing base (0270a47) to head (4a82a6a).

Files Patch % Lines
src/daemon/daemon_rpc.cpp 0.00% 3 Missing :warning:
src/daemon/daemon.cpp 0.00% 2 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #3448 +/- ## ========================================== - Coverage 88.68% 88.65% -0.04% ========================================== Files 254 254 Lines 14037 14042 +5 ========================================== Hits 12449 12449 - Misses 1588 1593 +5 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.