diff --git a/fboss/fsdb/client/FsdbPatchPublisher.cpp b/fboss/fsdb/client/FsdbPatchPublisher.cpp index 976071542f9af..c40a0c593bbe1 100644 --- a/fboss/fsdb/client/FsdbPatchPublisher.cpp +++ b/fboss/fsdb/client/FsdbPatchPublisher.cpp @@ -43,6 +43,12 @@ folly::coro::Task FsdbPatchPublisher::serveStream(StreamT&& stream) { XLOG(DBG2) << " Detected cancellation"; break; } + if (isGracefulServiceLoopCompletionRequested()) { + XLOG(ERR) << "Detected GR cancellation"; + throw FsdbClientGRDisconnectException( + "DeltaPublisher disconnectReason: GR"); + break; + } PublisherMessage message; message.set_patch(std::move(*patch)); co_yield std::move(message);