no need for these timeouts

This commit is contained in:
Grant Limberg 2025-10-02 16:00:08 -07:00
parent 1ef7ea0fe6
commit 6df7366753
No known key found for this signature in database
GPG key ID: 8F2F97D3BE8D7735

View file

@ -98,19 +98,16 @@ void PubSubListener::subscribe()
auto result = session.wait_for(std::chrono::seconds(10));
if (result == std::future_status::timeout) {
session.cancel();
std::this_thread::sleep_for(std::chrono::seconds(5));
continue;
}
if (! session.valid()) {
fprintf(stderr, "Subscription session no longer valid\n");
std::this_thread::sleep_for(std::chrono::seconds(5));
continue;
}
}
catch (google::cloud::Status const& status) {
fprintf(stderr, "Subscription terminated with status: %s\n", status.message().c_str());
std::this_thread::sleep_for(std::chrono::seconds(5));
}
}
}