Index: runtime/bin/eventhandler_win.cc |
diff --git a/runtime/bin/eventhandler_win.cc b/runtime/bin/eventhandler_win.cc |
index 27a509ed527c0019090c5f13537463bed8d898e7..b29f121894ec5afbb8b5444563b45f019d51ae3a 100644 |
--- a/runtime/bin/eventhandler_win.cc |
+++ b/runtime/bin/eventhandler_win.cc |
@@ -1121,15 +1121,13 @@ void EventHandlerImplementation::HandleWrite(Handle* handle, |
OverlappedBuffer* buffer) { |
handle->WriteComplete(buffer); |
- if (bytes > 0) { |
+ if (bytes >= 0) { |
if (!handle->IsError() && !handle->IsClosing()) { |
int event_mask = 1 << kOutEvent; |
if ((handle->mask() & event_mask) != 0) { |
DartUtils::PostInt32(handle->port(), event_mask); |
} |
} |
- } else if (bytes == 0) { |
- HandleClosed(handle); |
} else { |
HandleError(handle); |
} |