From 9da1fe360a2ec8fd1a248714eef286bd83de9c33 Mon Sep 17 00:00:00 2001 From: AJ Heller Date: Tue, 29 Oct 2024 16:48:27 +0000 Subject: [PATCH] [EventEngine] API contract: Endpoint::Read will provide either an error or data, but never both --- include/grpc/event_engine/event_engine.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/grpc/event_engine/event_engine.h b/include/grpc/event_engine/event_engine.h index 410c109dfc2..6e1c98102fa 100644 --- a/include/grpc/event_engine/event_engine.h +++ b/include/grpc/event_engine/event_engine.h @@ -194,9 +194,9 @@ class EventEngine : public std::enable_shared_from_this, /// on_read callback is not executed. Otherwise it returns false and the \a /// on_read callback executes asynchronously when the read completes. The /// caller must ensure that the callback has access to the buffer when it - /// executes. Ownership of the buffer is not transferred. Valid slices *may* - /// be placed into the buffer even if the callback is invoked with a non-OK - /// Status. + /// executes. Ownership of the buffer is not transferred. Either an error is + /// passed to the callback (like socket closed), or valid data is available + /// in the buffer, but never both at the same time. /// /// There can be at most one outstanding read per Endpoint at any given /// time. An outstanding read is one in which the \a on_read callback has