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

Unified Diff: runtime/bin/socket_patch.dart

Issue 91223002: Add support for Websocket protocols. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix selecting invalid protocol and document. Created 7 years, 1 month 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 | sdk/lib/io/http_parser.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/socket_patch.dart
diff --git a/runtime/bin/socket_patch.dart b/runtime/bin/socket_patch.dart
index 789dd001399664a3632d3f8e33467a49e198f5bb..1480f1f97b41ef2331744cca1e9313d799dddfc4 100644
--- a/runtime/bin/socket_patch.dart
+++ b/runtime/bin/socket_patch.dart
@@ -615,7 +615,9 @@ class _NativeSocket extends NativeFieldWrapperClass1 {
if (isClosedRead) {
close();
} else {
+ bool connected = eventPort != null;
sendToEventHandler(1 << SHUTDOWN_WRITE_COMMAND);
+ if (!connected) disconnectFromEventHandler();
}
isClosedWrite = true;
}
@@ -626,7 +628,9 @@ class _NativeSocket extends NativeFieldWrapperClass1 {
if (isClosedWrite) {
close();
} else {
+ bool connected = eventPort != null;
sendToEventHandler(1 << SHUTDOWN_READ_COMMAND);
+ if (!connected) disconnectFromEventHandler();
}
isClosedRead = true;
}
« no previous file with comments | « no previous file | sdk/lib/io/http_parser.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698