szaszm commented on a change in pull request #1028:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1028#discussion_r595282360



##########
File path: libminifi/include/io/InputStream.h
##########
@@ -39,43 +39,43 @@ class InputStream : public virtual Stream {
    * reads a byte array from the stream
    * @param value reference in which will set the result
    * @param len length to read
-   * @return resulting read size
+   * @return resulting read size or static_cast<size_t>(-1) on error or 
static_cast<size_t>(-2) for ClientSocket EAGAIN

Review comment:
       I felt the same, but didn't have a good idea how to resolve it. 
Refactoring Socket classes to use some other form of handling EAGAIN would be 
preferred, but that seems too out of scope here, and this change set feels 
dangerous enough already.
   
   I like the idea of `Stream::isError`, I'll change the checks.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to