Set error variable for failed write_data (#1036)

This commit is contained in:
Gregor Jasny 2021-09-05 22:15:46 +02:00 committed by GitHub
parent e20ecd2574
commit 415edc237c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -5941,7 +5941,12 @@ inline bool ClientImpl::write_request(Stream &strm, Request &req,
return write_content_with_provider(strm, req, error);
}
return detail::write_data(strm, req.body.data(), req.body.size());
if (!detail::write_data(strm, req.body.data(), req.body.size())) {
error = Error::Write;
return false;
}
return true;
}
inline std::unique_ptr<Response> ClientImpl::send_with_content_provider(