LanguageClient: allow aborting hover handler on unreachable clients

Change-Id: I1163144de7d37d3e270e31f2bf523ba812a937a5
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
David Schulz
2022-07-04 08:25:53 +02:00
parent e51790a180
commit 9dc1fb3381
2 changed files with 5 additions and 3 deletions

View File

@@ -639,7 +639,8 @@ void Client::sendMessage(const JsonRpcMessage &message, SendDocUpdates sendUpdat
void Client::cancelRequest(const MessageId &id)
{
d->m_responseHandlers.remove(id);
sendMessage(CancelRequest(CancelParameter(id)), SendDocUpdates::Ignore);
if (reachable())
sendMessage(CancelRequest(CancelParameter(id)), SendDocUpdates::Ignore);
}
void Client::closeDocument(TextEditor::TextDocument *document)