From 13d2925edf0292f72ec1efa0f72451413463a572 Mon Sep 17 00:00:00 2001 From: Dmitri Dolguikh Date: Thu, 26 Mar 2020 14:00:00 -0700 Subject: [PATCH] Fixes MAISTRA-1299: fix ASSERT failure and infinite loop when attempting to unset readDisable state on a closed connection, part 2 (#11) --- source/common/network/connection_impl.cc | 4 ---- 1 file changed, 4 deletions(-) diff --git a/source/common/network/connection_impl.cc b/source/common/network/connection_impl.cc index 3058420018..1c82507119 100644 --- a/source/common/network/connection_impl.cc +++ b/source/common/network/connection_impl.cc @@ -293,10 +293,6 @@ void ConnectionImpl::enableHalfClose(bool enabled) { void ConnectionImpl::readDisable(bool disable) { ASSERT(state() == State::Open); ASSERT(file_event_ != nullptr); - if (state() != State::Open || file_event_ == nullptr) { - // If readDisable is called on a closed connection in error, do not crash. - return; - } ENVOY_CONN_LOG(trace, "readDisable: enabled={} disable={} state={}", *this, read_enabled_, disable, static_cast(state()));