forked from Silverfish/proton-bridge
Other: Event Stream refactor.
Other: GRPCClient keeps track of the event stream status. [skip-ci] Other: renamed StartEventStream to RunEventStream for clarity. [skip-ci]
This commit is contained in:
@ -46,7 +46,7 @@ void EventStreamReader::run()
|
||||
{
|
||||
emit started();
|
||||
|
||||
grpc::Status const status = app().grpc().startEventStream();
|
||||
grpc::Status const status = app().grpc().runEventStreamReader();
|
||||
if (!status.ok())
|
||||
throw Exception(QString::fromStdString(status.error_message()));
|
||||
|
||||
|
||||
@ -285,7 +285,7 @@ int main(int argc, char *argv[])
|
||||
result = QGuiApplication::exec();
|
||||
|
||||
QObject::disconnect(connection);
|
||||
app().grpc().stopEventStream();
|
||||
app().grpc().stopEventStreamReader();
|
||||
if (!app().backend().waitForEventStreamReaderToFinish(5000))
|
||||
log.warn("Event stream reader took too long to finish.");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user