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

Unified Diff: editor/tools/plugins/com.google.dart.tools.debug.core/src/com/google/dart/tools/debug/core/pubserve/PubCommands.java

Issue 330123005: fix for pub serve to be terminated when editor is closed (Closed) Base URL: http://dart.googlecode.com/svn/trunk/dart/
Patch Set: Created 6 years, 6 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
« no previous file with comments | « no previous file | editor/tools/plugins/com.google.dart.tools.debug.core/src/com/google/dart/tools/debug/core/pubserve/PubServe.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: editor/tools/plugins/com.google.dart.tools.debug.core/src/com/google/dart/tools/debug/core/pubserve/PubCommands.java
===================================================================
--- editor/tools/plugins/com.google.dart.tools.debug.core/src/com/google/dart/tools/debug/core/pubserve/PubCommands.java (revision 37364)
+++ editor/tools/plugins/com.google.dart.tools.debug.core/src/com/google/dart/tools/debug/core/pubserve/PubCommands.java (working copy)
@@ -32,6 +32,28 @@
}
/**
+ * Sends a message to pub to indicate that it should shutdown when connection is closed. There is
+ * no result returned by pub.
+ *
+ * @throws IOException
+ */
+ public void exitOnClose() throws IOException {
+ // {"method": "exitOnClose"}
+
+ try {
+ JSONObject request = new JSONObject();
+
+ request.put("jsonrpc", "2.0");
+
+ request.put("method", "exitOnClose");
+
+ connection.sendRequest(request, null);
+ } catch (JSONException exception) {
+ throw new IOException(exception);
+ }
+ }
+
+ /**
* Given an asset ID, returns the relative URI path that asset would be served at.
*
* @param path
« no previous file with comments | « no previous file | editor/tools/plugins/com.google.dart.tools.debug.core/src/com/google/dart/tools/debug/core/pubserve/PubServe.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698