From d86a61f4584147af3031adce4ceb3678e502d455 Mon Sep 17 00:00:00 2001 From: Richard Hodges Date: Thu, 1 Sep 2022 15:44:22 +0200 Subject: [PATCH] Remove incorrect ASSERT in websocket read fix #2264 --- CHANGELOG.md | 4 ++++ include/boost/beast/websocket/impl/read.hpp | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 09086e1d..e03d64d2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +* Remove incorrect ASSERT in WebSocket read. + +-------------------------------------------------------------------------------- + Version 335: * Reduce size of multi_buffer. diff --git a/include/boost/beast/websocket/impl/read.hpp b/include/boost/beast/websocket/impl/read.hpp index 4c586fec..383d4cb1 100644 --- a/include/boost/beast/websocket/impl/read.hpp +++ b/include/boost/beast/websocket/impl/read.hpp @@ -123,7 +123,11 @@ public: BOOST_ASSERT(!ec); if(impl.check_stop_now(ec)) { - BOOST_ASSERT(ec == net::error::operation_aborted); + // Issue 2264 - There is no guarantee that the next + // error will be operation_aborted. + // The error could be a result of the peer resetting the + // connection + // BOOST_ASSERT(ec == net::error::operation_aborted); goto upcall; } // VFALCO Should never get here