From c2d1c70f684f24dc38df75ddd6ce96a8b799a3f6 Mon Sep 17 00:00:00 2001 From: tt2468 Date: Tue, 9 May 2023 18:26:25 -0700 Subject: [PATCH] requesthandler: Add NotReady request status During scene collection change and OBS exit, performing requests constitutes undefined behavior. Previously, we attempted to help this by providing the `SceneCollectionChanging` event for any clients to pause requests client-side, but this method has proven to not be adequate to fix the issue. As such, this allows us to tell clients explicitly that a request cannot be fulfilled reliably, and they may decide whether or not to retry. --- src/requesthandler/types/RequestStatus.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/requesthandler/types/RequestStatus.h b/src/requesthandler/types/RequestStatus.h index 604863c8..03c8ff4c 100644 --- a/src/requesthandler/types/RequestStatus.h +++ b/src/requesthandler/types/RequestStatus.h @@ -103,6 +103,19 @@ namespace RequestStatus { * @api enums */ UnsupportedRequestBatchExecutionType = 206, + /** + * The server is not ready to handle the request. + * + * Note: This usually occurs during OBS scene collection change or exit. Requests may be tried again after a delay if this code is given. + * + * @enumIdentifier NotReady + * @enumValue 207 + * @enumType RequestStatus + * @rpcVersion -1 + * @initialVersion 5.3.0 + * @api enums + */ + NotReady = 207, /** * A required request field is missing.