lordgamez commented on a change in pull request #1028:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1028#discussion_r605454800
##########
File path: extensions/http-curl/tests/HTTPHandlers.h
##########
@@ -214,7 +214,7 @@ class FlowFileResponder : public ServerAwareHandler {
minifi::io::CivetStream civet_stream(conn);
minifi::io::CRCStream < minifi::io::CivetStream >
stream(gsl::make_not_null(&civet_stream));
uint32_t num_attributes;
- int read;
+ size_t read;
Review comment:
This declaration could be merged with the definition
##########
File path: libminifi/include/io/Stream.h
##########
@@ -24,14 +24,23 @@ namespace nifi {
namespace minifi {
namespace io {
+inline bool isError(const size_t read_return) noexcept {
+ return read_return == static_cast<size_t>(-1) // general error
+ || read_return == static_cast<size_t>(-2); // Socket EAGAIN, to be
refactored to eliminate this error condition
Review comment:
It may be more readable to name `static_cast<size_t>(-1)` and
`static_cast<size_t>(-2)` as constants or as enums and replace them in the
codebase.
--
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]