Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
tedim52 committed Nov 8, 2024
1 parent f3f4a85 commit fdad7aa
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions engine/server/engine/server/engine_connect_server_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -358,16 +358,20 @@ func (service *EngineConnectServerService) GetServiceLogs(ctx context.Context, c
}
//client cancel ctx case
case <-contextWithCancel.Done():
if len(serviceLogsByServiceUuidChan) == 0 {
return nil
}
logrus.Debug("The user service logs stream has done")
return nil
//error from logs database case
case err, isChanOpen := <-errChan:
if isChanOpen {
logrus.Debug("Exiting the stream because an error from the logs database client was received through the error chan.")
return stacktrace.Propagate(err, "An error occurred streaming user service logs.")
}
logrus.Debug("Exiting the stream loop after receiving a close signal from the error chan")
return nil
if len(serviceLogsByServiceUuidChan) == 0 {
logrus.Debug("Exiting the stream loop after receiving a close signal from the error chan")
return nil
}
}
}
}
Expand Down

0 comments on commit fdad7aa

Please sign in to comment.