Revert some locks in LSPClientServerManager.

This commit is contained in:
Martín Lucas Golini
2025-06-27 21:30:23 -03:00
parent c9507c2cba
commit 0a5c4cff54

View File

@@ -230,7 +230,6 @@ void LSPClientServerManager::renameSymbol( const URI& uri, const TextPosition& p
}
bool LSPClientServerManager::isServerRunning( const LSPClientServer* server ) {
Lock l( mClientsMutex );
for ( const auto& svr : mClients ) {
if ( server == svr.second.get() ) {
if ( mErasingClients.find( svr.first ) != mErasingClients.end() )
@@ -286,7 +285,6 @@ void LSPClientServerManager::run( const std::shared_ptr<TextDocument>& doc ) {
}
size_t LSPClientServerManager::clientCount() const {
Lock l( mClientsMutex );
return mClients.size();
}
@@ -322,7 +320,6 @@ void LSPClientServerManager::updateDirty() {
// Kill server only after N seconds of inactivity
if ( server.second->getElapsedTime() > mLSPDecayTime ) {
// If a document was opened while waiting, remove the server from the queue
Lock l( mClientsMutex );
auto clientServer = mClients.find( server.first );
if ( clientServer != mClients.end() && clientServer->second->hasDocuments() ) {
invalidatedClose.push_back( server.first );