Add timeout for requests.
This commit is contained in:
parent
361458534c
commit
af338669f3
4 changed files with 77 additions and 15 deletions
|
|
@ -42,6 +42,12 @@ function! s:_Send( msg ) abort
|
|||
call ch_sendraw( s:ch, a:msg )
|
||||
endfunction
|
||||
|
||||
function! vimspector#internal#channel#Timeout( id ) abort
|
||||
py3 << EOF
|
||||
_vimspector_session.OnRequestTimeout( vim.eval( 'a:id' ) )
|
||||
EOF
|
||||
endfunction
|
||||
|
||||
function! vimspector#internal#channel#StartDebugSession( config ) abort
|
||||
|
||||
if exists( 's:ch' )
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ endfunction
|
|||
|
||||
function! vimspector#internal#job#StartDebugSession( config ) abort
|
||||
if exists( 's:job' )
|
||||
echo "Job is already running"
|
||||
echom "Job is already running"
|
||||
return v:none
|
||||
endif
|
||||
|
||||
|
|
@ -81,6 +81,10 @@ function! vimspector#internal#job#StartDebugSession( config ) abort
|
|||
endfunction
|
||||
|
||||
function! vimspector#internal#job#StopDebugSession() abort
|
||||
if ! exists( 's:job' )
|
||||
return
|
||||
endfunction
|
||||
|
||||
if job_status( s:job ) == 'run'
|
||||
call job_stop( s:job, 'term' )
|
||||
endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue