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

Unified Diff: runtime/bin/socket_patch.dart

Issue 19693007: Don't call accept the c socket, if we're currently closing. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 5 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
« runtime/bin/eventhandler_win.cc ('K') | « runtime/bin/eventhandler_win.cc ('k') | no next file » | 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 a3cc62be9335d3a74f9623a6d71b8f18fac021a1..c24ba4df3a531f3b84ec142a5205352fa9daac19 100644
--- a/runtime/bin/socket_patch.dart
+++ b/runtime/bin/socket_patch.dart
@@ -426,6 +426,8 @@ class _NativeSocket extends NativeFieldWrapperClass1 {
}
_NativeSocket accept() {
+ // Don't issue accept if we're closing.
+ if (isClosing || isClosed) return null;
var socket = new _NativeSocket.normal();
if (nativeAccept(socket) != true) return null;
socket.localPort = localPort;
« runtime/bin/eventhandler_win.cc ('K') | « runtime/bin/eventhandler_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698