Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update expensify_prod branch #1808

Merged
merged 8 commits into from
Jul 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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/[email protected]

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