Skip to content

Commit

Permalink
Merge pull request #1808 from Expensify/main
Browse files Browse the repository at this point in the history
Update expensify_prod branch
  • Loading branch information
chiragsalian committed Jul 11, 2024
2 parents 8e4cf96 + a8c8d73 commit bbf3f16
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/bedrock.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ jobs:
timeout-minutes: 30
steps:

- name: Install the Mold Linker
uses: rui314/setup-mold@v1

- name: Checkout Bedrock
uses: actions/checkout@v4.1.0

Expand Down
8 changes: 5 additions & 3 deletions BedrockServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2139,12 +2139,14 @@ 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. We won't store the socket on the command.
// Respond immediately to make it clear we successfully queued it, but don't return the socket to indicate we
// don't need to respond.
SINFO("Firing and forgetting '" << request.methodLine << "'");
SData response("202 Successfully queued");
response["Connection"] = "close";
if (_shutdownState.load() != RUNNING) {
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
2 changes: 1 addition & 1 deletion libstuff/libstuff.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1769,7 +1769,7 @@ int S_socket(const string& host, bool isTCP, bool isPort, bool isBlocking) {
// There was a problem.
if (result || !resolved) {
freeaddrinfo(resolved);
STHROW("can't resolve host error no#" + result);
STHROW("can't resolve host error no#" + SToStr(result));
}
// Grab the resolved address.
sockaddr_in* addr = (sockaddr_in*)resolved->ai_addr;
Expand Down

0 comments on commit bbf3f16

Please sign in to comment.