From be460675bc1b87a2f194780372219a061fb422a0 Mon Sep 17 00:00:00 2001 From: Vinnie Falco Date: Tue, 14 May 2019 14:41:41 -0700 Subject: [PATCH] Preserve operation_aborted on partial message --- CHANGELOG.md | 1 + include/boost/beast/http/impl/read.hpp | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b9204247..1b804bc8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ Version 256: * Fix `buffers_cat` iterator tests * Don't pessimize-move * Use steady_timer type +* Preserve operation_aborted on partial message -------------------------------------------------------------------------------- diff --git a/include/boost/beast/http/impl/read.hpp b/include/boost/beast/http/impl/read.hpp index faea67eb..e5f55f16 100644 --- a/include/boost/beast/http/impl/read.hpp +++ b/include/boost/beast/http/impl/read.hpp @@ -62,8 +62,12 @@ parse_until( // caller to distinguish an SSL short read which // represents a safe connection closure, versus // a closure with data loss. - if(parser.got_some() && ! parser.is_done()) + if( ec != net::error::operation_aborted && + parser.got_some() && ! parser.is_done()) + { ec = error::partial_message; + } + return 0; } if(parser.is_done())