Change g_network->runNetwork to API->runNetwork
This commit is contained in:
parent
775ac3e27c
commit
b2c063dd93
fdbcli
|
@ -3195,10 +3195,10 @@ ACTOR template <class T>
|
||||||
Future<T> stopNetworkAfter(Future<T> what) {
|
Future<T> stopNetworkAfter(Future<T> what) {
|
||||||
try {
|
try {
|
||||||
T t = wait(what);
|
T t = wait(what);
|
||||||
g_network->stop();
|
API->stopNetwork();
|
||||||
return t;
|
return t;
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
g_network->stop();
|
API->stopNetwork();
|
||||||
throw;
|
throw;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4685,7 +4685,7 @@ int main(int argc, char** argv) {
|
||||||
Future<int> cliFuture = runCli(opt);
|
Future<int> cliFuture = runCli(opt);
|
||||||
Future<Void> timeoutFuture = opt.exit_timeout ? timeExit(opt.exit_timeout) : Never();
|
Future<Void> timeoutFuture = opt.exit_timeout ? timeExit(opt.exit_timeout) : Never();
|
||||||
auto f = stopNetworkAfter(success(cliFuture) || timeoutFuture);
|
auto f = stopNetworkAfter(success(cliFuture) || timeoutFuture);
|
||||||
runNetwork();
|
API->runNetwork();
|
||||||
|
|
||||||
if (cliFuture.isReady()) {
|
if (cliFuture.isReady()) {
|
||||||
return cliFuture.get();
|
return cliFuture.get();
|
||||||
|
|
Loading…
Reference in New Issue