]> git.ipfire.org Git - thirdparty/squid.git/commit
Preserve caller context in TcpAcceptor (#1087)
authorEduard Bagdasaryan <eduard.bagdasaryan@measurement-factory.com>
Thu, 14 Jul 2022 21:33:40 +0000 (21:33 +0000)
committerSquid Anubis <squid-anubis@squid-cache.org>
Fri, 15 Jul 2022 12:25:01 +0000 (12:25 +0000)
commitf38db639645fec5442d10fed79589c1159ca9931
treeed7bb8fcdba395219cbc0d25049e9e6d4a627d23
parentd448e1eb9db0c150f88210182a4fbddb81109bdf
Preserve caller context in TcpAcceptor (#1087)

Before this fix, acceptOne() was losing FTP DATA TcpAcceptor context
by unconditionally resetting the context to a nil listenPort_.

Also, TcpAcceptor methods should not (be expected to) explicitly set
their job code context. Instead, the job should be created in the
right code context, allowing job-created async calls to auto-manage code
context. The updated port-iterating clientHttpConnectionsOpen() and
Ftp::StartListening() loops now set the right code context when creating
async calls that result in TcpAcceptor job creation.
src/client_side.cc
src/comm/TcpAcceptor.cc
src/servers/FtpServer.cc