Commit ccd760ae authored by peter.rybin@gmail.com's avatar peter.rybin@gmail.com

Add diagnostic print to debug agent if it fails to open port

Review URL: http://codereview.chromium.org/549061

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3621 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent a3c0f200
......@@ -54,10 +54,12 @@ void DebuggerAgent::Run() {
while (!bound && !terminate_) {
bound = server_->Bind(port_);
// If an error occoured wait a bit before retrying. The most common error
// If an error occurred wait a bit before retrying. The most common error
// would be that the port is already in use so this avoids a busy loop and
// make the agent take over the port when it becomes free.
if (!bound) {
PrintF("Failed to open socket on port %d, "
"waiting %d ms before retrying\n", port_, kOneSecondInMicros / 1000);
terminate_now_->Wait(kOneSecondInMicros);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment