chenBright commented on code in PR #2565: URL: https://github.com/apache/brpc/pull/2565#discussion_r1519848826
########## src/brpc/stream.h: ########## @@ -44,7 +44,18 @@ class StreamInputHandler { butil::IOBuf *const messages[], size_t size) = 0; virtual void on_idle_timeout(StreamId id) = 0; - virtual void on_closed(StreamId id) = 0; + // 1. If `split_closed_and_failed` returns false(default), + // only `on_closed` will be called. + // 2. If `split_closed_and_failed` returns true, + // 2.1 `on_closed` will be called Whether `StreamClose` + // is called by local side or remote side. + // 2.2 `on_failed` will be called when the stream is + // closed abnormally. + virtual void on_closed(StreamId id) = 0; + virtual void on_failed(StreamId id, int error_code, + const std::string& error_text); + + virtual bool split_closed_and_failed() const { return false; } Review Comment: done -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org For additional commands, e-mail: dev-h...@brpc.apache.org