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

Unified Diff: editor/tools/plugins/com.google.dart.tools.debug.core/src/com/google/dart/tools/debug/core/pubserve/PubServe.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 | « editor/tools/plugins/com.google.dart.tools.debug.core/src/com/google/dart/tools/debug/core/pubserve/PubCommands.java ('k') | no next file » | 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/PubServe.java
===================================================================
--- editor/tools/plugins/com.google.dart.tools.debug.core/src/com/google/dart/tools/debug/core/pubserve/PubServe.java (revision 37364)
+++ editor/tools/plugins/com.google.dart.tools.debug.core/src/com/google/dart/tools/debug/core/pubserve/PubServe.java (working copy)
@@ -136,6 +136,17 @@
}
/**
+ * Sends an exit on close command to pub, indicating pub serve should shut down when connection is
+ * lost.
+ *
+ * @throws IOException
+ */
+ void sendExitOnCloseCommand() throws IOException {
+ PubCommands command = pubConnection.getCommands();
+ command.exitOnClose();
+ }
+
+ /**
* Send a urlToAssetId command to the current pub serve
*
* @param url
@@ -227,7 +238,7 @@
});
pubConnection.connect();
-
+ sendExitOnCloseCommand();
}
private void copyStream(InputStream in, StringBuilder stringBuilder, boolean toConsole) {
« no previous file with comments | « editor/tools/plugins/com.google.dart.tools.debug.core/src/com/google/dart/tools/debug/core/pubserve/PubCommands.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698