Stop polling for readiness if server crashed

This commit is contained in:
micbou 2017-07-05 05:15:33 +02:00
parent 25a2e3120c
commit 1ceabea26e
No known key found for this signature in database
GPG Key ID: C7E8FD1F3BDA1E05
2 changed files with 6 additions and 1 deletions

View File

@ -486,6 +486,11 @@ endfunction
function! s:PollServerReady( timer_id )
if !s:Pyeval( 'ycm_state.IsServerAlive()' )
" Server crashed. Don't poll it again.
return
endif
if !s:Pyeval( 'ycm_state.CheckIfServerIsReady()' )
let s:pollers.server_ready.id = timer_start(
\ s:pollers.server_ready.wait_milliseconds,

View File

@ -221,7 +221,7 @@ class YouCompleteMe( object ):
def CheckIfServerIsReady( self ):
if not self._server_is_ready_with_cache and self.IsServerAlive():
if not self._server_is_ready_with_cache:
with HandleServerException( display = False ):
self._server_is_ready_with_cache = BaseRequest.GetDataFromHandler(
'ready' )