Skip to content

Commit

Permalink
Restart Account connection after remote close
Browse files Browse the repository at this point in the history
  • Loading branch information
jcoffland committed Jun 5, 2024
1 parent 40a6c12 commit 4a9165b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/fah/client/Account.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -398,13 +398,14 @@ void Account::onMessage(const JSON::ValuePtr &msg) {

void Account::onClose(WS::Status status, const string &msg) {
LOG_INFO(1, "Account websocket closed: " << status << " msg=" << msg);
updateEvent->add(5);

// Close remotes
for (auto &remote: nodes)
remote.second->close();

nodes.clear();

if (status != WS::Status::WS_STATUS_NORMAL) restart();
}


Expand Down

0 comments on commit 4a9165b

Please sign in to comment.