Revert "GODT-2014: bridge quit if gRPC client ends stream."

This reverts commit 8ca849b7a8.
This commit is contained in:
James Houlahan
2022-11-04 00:56:59 +01:00
parent f965d01922
commit cc9ad17ea5
3 changed files with 16 additions and 51 deletions

View File

@ -95,15 +95,12 @@ func (s *Service) GuiReady(ctx context.Context, _ *emptypb.Empty) (*emptypb.Empt
// Quit implement the Quit gRPC service call.
func (s *Service) Quit(ctx context.Context, empty *emptypb.Empty) (*emptypb.Empty, error) {
s.log.Debug("Quit")
return &emptypb.Empty{}, s.quit()
}
func (s *Service) quit() error {
// Windows is notably slow at Quitting. We do it in a goroutine to speed things up a bit.
go func() {
var err error
if s.isStreamingEvents() {
if err = s.stopEventStream(); err != nil {
if s.eventStreamCh != nil {
if _, err = s.StopEventStream(ctx, empty); err != nil {
s.log.WithError(err).Error("Quit failed.")
}
}
@ -112,7 +109,7 @@ func (s *Service) quit() error {
s.grpcServer.GracefulStop()
}()
return nil
return &emptypb.Empty{}, nil
}
// Restart implement the Restart gRPC service call.