Don't cache invalid completer check results
If the check for available completers isn't run because the server isn't alive, or the check request erred or times out, don't cache the result. Only cache valid returns.
This commit is contained in:
parent
f25e1c9a48
commit
e57178da00
@ -222,8 +222,14 @@ class YouCompleteMe( object ):
|
||||
except KeyError:
|
||||
pass
|
||||
|
||||
exists_completer = ( self.IsServerAlive() and
|
||||
bool( SendCompleterAvailableRequest( filetype ) ) )
|
||||
if not self.IsServerAlive():
|
||||
return False
|
||||
|
||||
exists_completer = SendCompleterAvailableRequest( filetype )
|
||||
if exists_completer is None:
|
||||
return False
|
||||
|
||||
exists_completer = bool ( exists_completer )
|
||||
self._available_completers[ filetype ] = exists_completer
|
||||
return exists_completer
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user