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

Unified Diff: util/win/registration_protocol_win.cc

Issue 1409693011: win: Only retry in UseHandler() loop on ERROR_PIPE_BUSY (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: Created 5 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: util/win/registration_protocol_win.cc
diff --git a/util/win/registration_protocol_win.cc b/util/win/registration_protocol_win.cc
index 3e0fdf213985a4bc81ae295bd3377140463045da..09c7f941e6146332e6ebd3ad7d520c2007bda6f8 100644
--- a/util/win/registration_protocol_win.cc
+++ b/util/win/registration_protocol_win.cc
@@ -35,7 +35,15 @@ bool SendToCrashHandlerServer(const base::string16& pipe_name,
SECURITY_SQOS_PRESENT | SECURITY_IDENTIFICATION,
nullptr));
if (!pipe.is_valid()) {
- Sleep(10);
+ if (GetLastError() != ERROR_PIPE_BUSY) {
+ PLOG(ERROR) << "CreateFile";
+ return false;
+ }
+
+ if (!WaitNamedPipe(pipe_name.c_str(), 1000)) {
Mark Mentovai 2015/11/06 23:03:34 We don’t want to do this at all on the last try.
scottmg 2015/11/06 23:10:59 Done.
+ PLOG(ERROR) << "WaitNamedPipe";
Mark Mentovai 2015/11/06 23:03:34 If GetLastError() is ERROR_SEM_TIMEOUT, we should
scottmg 2015/11/06 23:10:59 Done.
+ return false;
+ }
--tries;
continue;
}
« 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