Skip to content

Commit

Permalink
Merge pull request #1805 from Expensify/main
Browse files Browse the repository at this point in the history
Update expensify_prod branch
  • Loading branch information
Julesssss authored Jul 11, 2024
2 parents 2d8b2c7 + 8f46054 commit 8e4cf96
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions BedrockServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2139,14 +2139,12 @@ unique_ptr<BedrockCommand> BedrockServer::buildCommandFromRequest(SData&& reques

bool fireAndForget = false;
if (SIEquals(request["Connection"], "forget") || (uint64_t)request.calc64("commandExecuteTime") > STimeNow()) {
// Respond immediately to make it clear we successfully queued it, but don't return the socket to indicate we
// don't need to respond.
// Respond immediately to make it clear we successfully queued it. We won't store the socket on the command.
SINFO("Firing and forgetting '" << request.methodLine << "'");
SData response("202 Successfully queued");
if (_shutdownState.load() != RUNNING) {
response["Connection"] = "close";
}
response["Connection"] = "close";
socket.send(response.serialize());
socket.shutdown(Socket::CLOSED);
fireAndForget = true;

// If we're shutting down, discard this command, we won't wait for the future.
Expand Down

0 comments on commit 8e4cf96

Please sign in to comment.