Skip to content

Commit

Permalink
Add traces during postponing
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnnyMorganz committed Jun 26, 2024
1 parent a2192ba commit ba1d053
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/LanguageServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,7 @@ void LanguageServer::handleMessage(const json_rpc::JsonRpcMessage& msg)
{
if (isInitialized && !allWorkspacesConfigured())
{
client->sendTrace("workspaces not configured, postponing message: " + msg.id.value());
configPostponedMessages.emplace_back(msg);
return;
}
Expand Down Expand Up @@ -391,10 +392,12 @@ void LanguageServer::processInputLoop()
{
if (configPostponedMessages.size() > 0 && allWorkspacesConfigured())
{
client->sendTrace("workspaces configured, handling postponed messages");
for (const auto& msg : configPostponedMessages)
handleMessage(msg);

configPostponedMessages.clear();
client->sendTrace("workspaces configured, handling postponed COMPLETED");
}

if (client->readRawMessage(jsonString))
Expand Down

0 comments on commit ba1d053

Please sign in to comment.