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

Unified Diff: mojo/edk/system/node_controller.cc

Issue 2010783004: [mojo-edk] Revert port reservation timeout behavior (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 | « mojo/edk/system/node_controller.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/system/node_controller.cc
diff --git a/mojo/edk/system/node_controller.cc b/mojo/edk/system/node_controller.cc
index 822165a99756a4d26253d2bdd589a4b33a3fc1a0..6e93e9c7d462d99d3bc33b5c44e910732b6d44c3 100644
--- a/mojo/edk/system/node_controller.cc
+++ b/mojo/edk/system/node_controller.cc
@@ -190,14 +190,6 @@ void NodeController::ReservePort(const std::string& token,
base::AutoLock lock(reserved_ports_lock_);
auto result = reserved_ports_.insert(std::make_pair(token, port));
DCHECK(result.second);
-
- // Safeguard against unpredictable and exceptional cases where a reservation
- // holder may disappear without ever claiming their reservation.
- io_task_runner_->PostDelayedTask(
- FROM_HERE,
- base::Bind(&NodeController::CancelReservation,
- base::Unretained(this), token),
- base::TimeDelta::FromMinutes(1));
}
void NodeController::MergePortIntoParent(const std::string& token,
@@ -547,19 +539,6 @@ void NodeController::DropAllPeers() {
delete this;
}
-void NodeController::CancelReservation(const std::string& token) {
- ports::PortRef reserved_port;
- {
- base::AutoLock lock(reserved_ports_lock_);
- auto iter = reserved_ports_.find(token);
- if (iter == reserved_ports_.end()) // Already claimed!
- return;
- reserved_port = iter->second;
- reserved_ports_.erase(iter);
- }
- node_->ClosePort(reserved_port);
-}
-
void NodeController::GenerateRandomPortName(ports::PortName* port_name) {
GenerateRandomName(port_name);
}
« no previous file with comments | « mojo/edk/system/node_controller.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698