MCPcopy Create free account
hub / github.com/NetSys/bess / KillBess

Method KillBess

core/bessctl.cc:1657–1674  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1655 }
1656
1657 Status KillBess(ServerContext*, const EmptyRequest*,
1658 EmptyResponse*) override {
1659 std::lock_guard<std::recursive_mutex> lock(mutex_);
1660
1661 WorkerPauser wp;
1662 LOG(WARNING) << "Halt requested by a client\n";
1663
1664 CHECK(shutdown_func_ != nullptr);
1665 std::thread shutdown_helper([this]() {
1666 // Deadlock occurs when closing a gRPC server while processing a RPC.
1667 // Instead, we defer calling gRPC::Server::Shutdown() to a temporary
1668 // thread.
1669 shutdown_func_();
1670 });
1671 shutdown_helper.detach();
1672
1673 return Status::OK;
1674 }
1675
1676 Status ImportPlugin(ServerContext*, const ImportPluginRequest* request,
1677 EmptyResponse* response) override {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected