Skip to content

Commit

Permalink
Merge pull request #2036 from Expensify/main
Browse files Browse the repository at this point in the history
Update expensify_prod branch
  • Loading branch information
rafecolton authored Dec 19, 2024
2 parents ebb44f4 + c8bddad commit ca35de4
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions sqlitecluster/SQLiteNode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1259,12 +1259,6 @@ void SQLiteNode::_onMESSAGE(SQLitePeer* peer, const SData& message) {
peer->latency = max(STimeNow() - message.calc64("Timestamp"), 1ul);
SINFO("Received PONG from peer '" << peer->name << "' (" << peer->latency/1000 << "ms latency)");
return;
} else if (SIEquals(message.methodLine, "NODE_LOGIN")) {
// We need to return early here to ignore this deprecated message and avoid throwing:
// STHROW("not logged in");
// Below. We can remove this check after one more deploy cycle.
// https://github.com/Expensify/Expensify/issues/450953
return;
}

// We ignore everything except PING and PONG from forked nodes, so we can return here in that case.
Expand Down Expand Up @@ -2559,10 +2553,7 @@ void SQLiteNode::postPoll(fd_map& fdm, uint64_t& nextActivity) {
int messageSize = message.deserialize(socket->recvBuffer);
if (messageSize) {
socket->recvBuffer.consumeFront(messageSize);
// Old nodes, for one more upgrade cycle, will still send `NODE_LOGIN`. We can remove this check after this
// code is deployed.
// See: https://github.com/Expensify/Expensify/issues/450953
if (SIEquals(message.methodLine, "NODE_LOGIN") || SIEquals(message.methodLine, "LOGIN")) {
if (SIEquals(message.methodLine, "LOGIN")) {
SQLitePeer* peer = getPeerByName(message["Name"]);
if (peer) {
if (peer->setSocket(socket)) {
Expand Down

0 comments on commit ca35de4

Please sign in to comment.