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

Unified Diff: runtime/bin/socket_patch.dart

Issue 974953002: Revert "Fix issues with Socket shutdown." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 10 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 | tests/standalone/io/issue_22637_test.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 dfbd46589e564f18d875c00975941125320c3c9d..c866977f29ad60b7ac3b771a39e57f68add1782f 100644
--- a/runtime/bin/socket_patch.dart
+++ b/runtime/bin/socket_patch.dart
@@ -287,7 +287,6 @@ class _NativeSocket extends _NativeSocketNativeWrapper with _ServiceObject {
bool isClosed = false;
bool isClosing = false;
bool isClosedRead = false;
- bool closedReadEventSent = false;
bool isClosedWrite = false;
Completer closeCompleter = new Completer.sync();
@@ -695,7 +694,6 @@ class _NativeSocket extends _NativeSocketNativeWrapper with _ServiceObject {
}
void issueReadEvent() {
- if (closedReadEventSent) return;
if (readEventIssued) return;
readEventIssued = true;
void issue() {
@@ -703,11 +701,10 @@ class _NativeSocket extends _NativeSocketNativeWrapper with _ServiceObject {
if (isClosing) return;
if (!sendReadEvents) return;
if (available == 0) {
- if (isClosedRead && !closedReadEventSent) {
+ if (isClosedRead) {
if (isClosedWrite) close();
var handler = eventHandlers[CLOSED_EVENT];
if (handler == null) return;
- closedReadEventSent = true;
handler();
}
return;
@@ -863,7 +860,7 @@ class _NativeSocket extends _NativeSocketNativeWrapper with _ServiceObject {
void shutdownWrite() {
if (!isClosing && !isClosed) {
- if (closedReadEventSent) {
+ if (isClosedRead) {
close();
} else {
sendToEventHandler(1 << SHUTDOWN_WRITE_COMMAND);
« no previous file with comments | « no previous file | tests/standalone/io/issue_22637_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698