Commit 19381b51 by Tianqi Chen Committed by GitHub

[RPC] Enable shutdown hook (#308)

parent 48fd9e46
......@@ -749,6 +749,9 @@ void RPCSession::ServerLoop() {
TVMRetValue rv;
CHECK(HandleUntilReturnEvent(&rv, false, nullptr) == RPCCode::kShutdown);
LOG(INFO) << "Shutdown...";
if (const auto* f = Registry::Get("tvm.contrib.rpc.server.shutdown")) {
(*f)();
}
channel_.reset(nullptr);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment