eepp: mojoAL is now used by default.

ecode: Tentative fix for a segfaul when accesing an LSP Server that isn't running anymore.
This commit is contained in:
Martín Lucas Golini
2023-04-19 20:37:34 -03:00
parent 3477d5bc69
commit da44cca16e
20 changed files with 95 additions and 44 deletions

View File

@@ -199,6 +199,17 @@ void LSPClientServerManager::renameSymbol( const URI& uri, const TextPosition& p
} );
}
bool LSPClientServerManager::isServerRunning( const LSPClientServer* server ) {
for ( const auto& svr : mClients ) {
if ( server == svr.second.get() ) {
if ( mErasingClients.find( svr.first ) != mErasingClients.end() )
return false;
return true;
}
}
return false;
}
void LSPClientServerManager::run( const std::shared_ptr<TextDocument>& doc ) {
mThreadPool->run( [&, doc]() { tryRunServer( doc ); } );
}