Index: remoting/base/stoppable.cc |
diff --git a/remoting/base/stoppable.cc b/remoting/base/stoppable.cc |
index 88b3c95ef953cdf9fbe840ab4db168954d745a40..db667dc3dc8c99addc2c51d81f0ae4cf6074ece3 100644 |
--- a/remoting/base/stoppable.cc |
+++ b/remoting/base/stoppable.cc |
@@ -24,9 +24,12 @@ Stoppable::~Stoppable() { |
void Stoppable::Stop() { |
DCHECK(task_runner_->BelongsToCurrentThread()); |
+ // DoStop() can be called multiple times. stoppable_state() can be queried |
+ // to tell the first call from the follow up calls. |
+ DoStop(); |
Wez
2012/08/08 20:13:41
Isn't there a risk that something in DoStop() trig
alexeypa (please no reviews)
2012/08/08 21:49:58
This is the intended behavior. :-)
alexeypa (please no reviews)
2012/08/10 16:18:44
It turned out that this breaks stoppable state val
|
+ |
if (state_ == kRunning) { |
state_ = kStopping; |
- DoStop(); |
} |
} |