summaryrefslogtreecommitdiff
path: root/boost/iostreams/detail/adapter/non_blocking_adapter.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/iostreams/detail/adapter/non_blocking_adapter.hpp')
-rwxr-xr-xboost/iostreams/detail/adapter/non_blocking_adapter.hpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/boost/iostreams/detail/adapter/non_blocking_adapter.hpp b/boost/iostreams/detail/adapter/non_blocking_adapter.hpp
index 1457032c71..623cf769d2 100755
--- a/boost/iostreams/detail/adapter/non_blocking_adapter.hpp
+++ b/boost/iostreams/detail/adapter/non_blocking_adapter.hpp
@@ -41,6 +41,9 @@ public:
while (result < n) {
std::streamsize amt =
iostreams::write(device_, s + result, n - result);
+ // write errors, like EOF on read, need to be handled.
+ if (amt == -1)
+ break;
result += amt;
}
return result;