Stop polling for readiness if server crashed
This commit is contained in:
parent
25a2e3120c
commit
1ceabea26e
@ -486,6 +486,11 @@ endfunction
|
|||||||
|
|
||||||
|
|
||||||
function! s:PollServerReady( timer_id )
|
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()' )
|
if !s:Pyeval( 'ycm_state.CheckIfServerIsReady()' )
|
||||||
let s:pollers.server_ready.id = timer_start(
|
let s:pollers.server_ready.id = timer_start(
|
||||||
\ s:pollers.server_ready.wait_milliseconds,
|
\ s:pollers.server_ready.wait_milliseconds,
|
||||||
|
@ -221,7 +221,7 @@ class YouCompleteMe( object ):
|
|||||||
|
|
||||||
|
|
||||||
def CheckIfServerIsReady( self ):
|
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 ):
|
with HandleServerException( display = False ):
|
||||||
self._server_is_ready_with_cache = BaseRequest.GetDataFromHandler(
|
self._server_is_ready_with_cache = BaseRequest.GetDataFromHandler(
|
||||||
'ready' )
|
'ready' )
|
||||||
|
Loading…
Reference in New Issue
Block a user