szaszm commented on a change in pull request #1083:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1083#discussion_r649310746
##########
File path: libminifi/include/io/Stream.h
##########
@@ -26,13 +26,13 @@ namespace io {
constexpr size_t STREAM_ERROR = static_cast<size_t>(-1);
-inline bool isError(const size_t read_return) noexcept {
- return read_return == STREAM_ERROR // general error
- || read_return == static_cast<size_t>(-2); // Socket EAGAIN, to be
refactored to eliminate this error condition
+inline bool isError(const size_t read_write_return) noexcept {
+ return read_write_return == STREAM_ERROR // general error
+ || read_write_return == static_cast<size_t>(-2); // read: Socket
EAGAIN, to be refactored to eliminate this error condition
}
-inline bool isError(const int write_return) noexcept {
- return write_return == -1;
+inline bool isError(const int legacy_write_return) noexcept {
+ return legacy_write_return == -1;
Review comment:
There are still some io errors reported as int. One of the more complex
ones that I didn't refactor was `FlowFileSerializer.cpp:97` where `reader_` is
a `std::function` returning int. It looks like the int comes from
`session->read` or `callback->process`, depending on the usage. Other usages:
`RawSocketProtocol.cpp:306`, `SiteToSiteClient.cpp:429`.
--
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]