Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9)

Unified Diff: pkg/analysis_server/lib/src/protocol.dart

Issue 237793002: Fix race condition with "server already started" error. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: pkg/analysis_server/lib/src/protocol.dart
diff --git a/pkg/analysis_server/lib/src/protocol.dart b/pkg/analysis_server/lib/src/protocol.dart
index 4b5a561900752f9e6fde93842254ea3d12dab3cf..c219cf3a267812228b55d20bbc22881b60c1373a 100644
--- a/pkg/analysis_server/lib/src/protocol.dart
+++ b/pkg/analysis_server/lib/src/protocol.dart
@@ -353,6 +353,12 @@ class RequestError {
* server. An error occurred on the server while parsing the JSON text.
*/
static const int CODE_PARSE_ERROR = -32700;
+
+ /**
+ * An error code indicating that the analysis server has already been
+ * started (and hence won't accept new connections).
+ */
+ static const int CODE_SERVER_ALREADY_STARTED = -32701;
/**
* An error code indicating an invalid request. The JSON sent is not a valid
@@ -414,6 +420,13 @@ class RequestError {
RequestError.parseError() : this(CODE_PARSE_ERROR, "Parse error");
/**
+ * Initialize a newly created [Error] to indicate that the analysis server
+ * has already been started (and hence won't accept new connections).
+ */
+ RequestError.serverAlreadyStarted()
+ : this(CODE_SERVER_ALREADY_STARTED, "Server already started");
+
+ /**
* Initialize a newly created [Error] to indicate an invalid request. The
* JSON sent is not a valid [Request] object.
*/

Powered by Google App Engine
This is Rietveld 408576698