| 3400 | |
| 3401 | |
| 3402 | void Master::disconnect(Framework* framework) |
| 3403 | { |
| 3404 | CHECK_NOTNULL(framework); |
| 3405 | CHECK(framework->connected()); |
| 3406 | |
| 3407 | if (framework->active()) { |
| 3408 | deactivate(framework, true); |
| 3409 | } |
| 3410 | |
| 3411 | LOG(INFO) << "Disconnecting framework " << *framework; |
| 3412 | |
| 3413 | if (framework->pid().isSome()) { |
| 3414 | // Remove the framework from authenticated. This is safe because |
| 3415 | // a framework will always reauthenticate before (re-)registering. |
| 3416 | authenticated.erase(framework->pid().get()); |
| 3417 | } |
| 3418 | |
| 3419 | CHECK(framework->disconnect()); |
| 3420 | } |
| 3421 | |
| 3422 | |
| 3423 | void Master::deactivate(Framework* framework, bool rescind) |