-
Notifications
You must be signed in to change notification settings - Fork 770
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #310 - micbou:cs-completer, r=Valloric
[READY] Prevent simultaneous starts of OmniSharp server Currently, C# completer starts a new server on the `FileReadyToParse` event if no port is defined or the running server does not respond. This can lead to situations where multiple servers with same port and solution are started until one of them become ready. See PR #284 and ycm-core/YouCompleteMe#1913. This is fixed by using `ServerIsActive` instead of `ServerIsRunning` to start the server in `OnFileReadyToParse`. We then check `ServerIsRunning` for an early return. `ServerIsActive` is updated to check the handle (instead of the port) and to poll the process. We cannot only rely on the port because it can be defined while the process is down: server crashed during start up or its process was directly terminated by the user. `ServerIsRunning` and `ServerIsReady` are also changed. We return early in both methods by checking `ServerIsAlive` first and we restrict exceptions catching. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/valloric/ycmd/310) <!-- Reviewable:end -->
- Loading branch information
Showing
5 changed files
with
48 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters