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

Unified Diff: runtime/bin/eventhandler_win.cc

Issue 1151753008: Cap the number of pending accepts on Windows (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 7 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/eventhandler_win.cc
diff --git a/runtime/bin/eventhandler_win.cc b/runtime/bin/eventhandler_win.cc
index d3091f6d6198a81f31cc9f803b5303f205fc0885..db698a3c8831e637cb17e15fbeef1c242548d152 100644
--- a/runtime/bin/eventhandler_win.cc
+++ b/runtime/bin/eventhandler_win.cc
@@ -562,9 +562,12 @@ ClientSocket* ListenSocket::Accept() {
accepted_count_--;
}
- if (!IsClosing()) {
- if (!IssueAccept()) {
- HandleError(this);
+ if (pending_accept_count_ < 5) {
+ // We have less than 5 pending accepts, queue another.
+ if (!IsClosing()) {
+ if (!IssueAccept()) {
+ HandleError(this);
+ }
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698