Change g_network->runNetwork to API->runNetwork

This commit is contained in:
Chaoguang Lin 2021-08-18 18:09:02 -07:00
parent 775ac3e27c
commit b2c063dd93
1 changed files with 3 additions and 3 deletions

View File

@ -3195,10 +3195,10 @@ ACTOR template <class T>
Future<T> stopNetworkAfter(Future<T> what) {
try {
T t = wait(what);
g_network->stop();
API->stopNetwork();
return t;
} catch (...) {
g_network->stop();
API->stopNetwork();
throw;
}
}
@ -4685,7 +4685,7 @@ int main(int argc, char** argv) {
Future<int> cliFuture = runCli(opt);
Future<Void> timeoutFuture = opt.exit_timeout ? timeExit(opt.exit_timeout) : Never();
auto f = stopNetworkAfter(success(cliFuture) || timeoutFuture);
runNetwork();
API->runNetwork();
if (cliFuture.isReady()) {
return cliFuture.get();