Skip to content

Commit

Permalink
Auto merge of #281 - puremourning:tern-timeout-exit, r=Valloric
Browse files Browse the repository at this point in the history
[READY] Remove timeout from Tern completer

Fixes #278

As described on the issue, the Tern server exits when a timeout is hit. The Tern server's timeout is actually a guesstimate anyway, and ignores I/O time. We're better off just removing it and relying on ycmd client requests timing out. It doesn't appear that the other completers add any other time-out.

We can re-asses should ternjs/tern#702 be fixed.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/valloric/ycmd/281)
<!-- Reviewable:end -->
  • Loading branch information
homu committed Dec 20, 2015
2 parents 24f5d51 + 07d11b3 commit dee9afe
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions ycmd/completers/javascript/tern_completer.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ def _PostRequest( self, request, request_data ):
the files are being updated.
The request block should contain the optional query block only. The file
data and timeout are are added automatically."""
data are added automatically."""

if not self._ServerIsRunning():
raise ValueError( 'Not connected to server' )
Expand All @@ -271,7 +271,6 @@ def MakeIncompleteFile( name, file_data ):
full_request = {
'files': [ MakeIncompleteFile( x, file_data[ x ] )
for x in file_data.keys() ],
'timeout': 500,
}
full_request.update( request )

Expand All @@ -292,7 +291,7 @@ def _GetResponse( self, query, request_data ):
just updating file data in which case _PostRequest should be used directly.
The query block should contain the type and any parameters. The files,
position, timeout etc. are added automatically."""
position, etc. are added automatically."""

def MakeTernLocation( request_data ):
return {
Expand Down

0 comments on commit dee9afe

Please sign in to comment.