refactor: Remove call to ShutdownRequested from HTTPRequest

Pass HTTP server an interrupt object instead of having it depend on shutdown.h
and global shutdown state.

There is no change in behavior in this commit.
This commit is contained in:
Ryan Ofsky
2023-07-07 17:32:54 -04:00
parent 73133c36aa
commit 42e5829d97
4 changed files with 19 additions and 10 deletions

View File

@@ -690,8 +690,9 @@ static bool AppInitServers(NodeContext& node)
const ArgsManager& args = *Assert(node.args);
RPCServer::OnStarted(&OnRPCStarted);
RPCServer::OnStopped(&OnRPCStopped);
if (!InitHTTPServer())
if (!InitHTTPServer(*Assert(node.shutdown))) {
return false;
}
StartRPC();
node.rpc_interruption_point = RpcInterruptionPoint;
if (!StartHTTPRPC(&node))