Skip to content

Commit

Permalink
Fixing the fix (envoyproxy#4333)
Browse files Browse the repository at this point in the history
Signed-off-by: Alyssa Wilk <alyssar@chromium.org>
  • Loading branch information
alyssawilk authored and ggreenway committed Sep 4, 2018
1 parent 83487f6 commit 752483e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion source/common/network/connection_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ ConnectionImpl::ConnectionImpl(Event::Dispatcher& dispatcher, ConnectionSocketPt
}

ConnectionImpl::~ConnectionImpl() {
ASSERT(fd() == -1);
ASSERT(fd() == -1, "ConnectionImpl was unexpectedly torn down without being closed.");

// In general we assume that owning code has called close() previously to the destructor being
// run. This generally must be done so that callbacks run in the correct context (vs. deferred
Expand Down
2 changes: 2 additions & 0 deletions test/integration/echo_integration_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,8 @@ TEST_P(EchoIntegrationTest, AddRemoveListener) {
if (connection2.connection().state() == Network::Connection::State::Closed) {
connect_fail = true;
break;
} else {
connection2.close();
}
}
ASSERT_TRUE(connect_fail);
Expand Down

0 comments on commit 752483e

Please sign in to comment.