Skip to content

Commit ed22857

Browse files
committed
distinguish between timeouts and errors
1 parent c470763 commit ed22857

2 files changed

Lines changed: 8 additions & 3 deletions

File tree

libs/server-sdk/src/data_interfaces/source/fdv2_source_result.hpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,13 @@ struct FDv2SourceResult {
5656
bool fdv1_fallback;
5757
};
5858

59-
using Value =
60-
std::variant<ChangeSet, Interrupted, TerminalError, Shutdown, Goodbye>;
59+
/**
60+
* Next() returned because the timeout expired before a result arrived.
61+
*/
62+
struct Timeout {};
63+
64+
using Value = std::variant<ChangeSet, Interrupted, TerminalError, Shutdown,
65+
Goodbye, Timeout>;
6166

6267
Value value;
6368
};

libs/server-sdk/src/data_interfaces/source/ifdv2_synchronizer.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class IFDv2Synchronizer {
2525
* Subsequent calls continue reading from the same connection.
2626
*
2727
* If the timeout expires before a result arrives, returns
28-
* FDv2SourceResult::Interrupted. The orchestrator uses this to evaluate
28+
* FDv2SourceResult::Timeout. The orchestrator uses this to evaluate
2929
* fallback conditions.
3030
*
3131
* Close() may be called from another thread to unblock Next(), in which

0 commit comments

Comments
 (0)