Skip to content

Commit

Permalink
listener: clean up accept filters before connection creation (envoypr…
Browse files Browse the repository at this point in the history
…oxy#119)

Signed-off-by: Yuchen Dai <silentdai@gmail.com>
  • Loading branch information
lambdai authored and howardjohn committed Nov 7, 2019
1 parent e3a4908 commit bc4e866
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions source/server/connection_handler_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,9 @@ void ConnectionHandlerImpl::ActiveTcpSocket::newConnection() {
socket_->setDetectedTransportProtocol(
Extensions::TransportSockets::TransportProtocolNames::get().RawBuffer);
}
// Erase accept filter states because accept filters may not get the opportunity to clean up.
// Particularly the assigned events need to reset before assigning new events in the follow up.
accept_filters_.clear();
// Create a new connection on this listener.
listener_.newConnection(std::move(socket_));
}
Expand Down

0 comments on commit bc4e866

Please sign in to comment.