Merge "adbd: avoid starting multiple worker threads."

This commit is contained in:
Treehugger Robot 2019-05-02 21:09:04 +00:00 committed by Gerrit Code Review
commit 5ddd49eeae
1 changed files with 4 additions and 0 deletions

View File

@ -310,11 +310,13 @@ struct UsbFfsConnection : public Connection {
if (bound) {
LOG(WARNING) << "received FUNCTIONFS_BIND while already bound?";
running = false;
break;
}
if (enabled) {
LOG(WARNING) << "received FUNCTIONFS_BIND while already enabled?";
running = false;
break;
}
bound = true;
@ -324,11 +326,13 @@ struct UsbFfsConnection : public Connection {
if (!bound) {
LOG(WARNING) << "received FUNCTIONFS_ENABLE while not bound?";
running = false;
break;
}
if (enabled) {
LOG(WARNING) << "received FUNCTIONFS_ENABLE while already enabled?";
running = false;
break;
}
enabled = true;