wallet: wait for monero-wallet-rpc to accept before publishing the child
This commit is contained in:
parent
f5e310fdf4
commit
081bdfac3e
2 changed files with 138 additions and 44 deletions
|
|
@ -618,6 +618,9 @@ impl WalletChild {
|
|||
// monero-wallet-rpc creates the wallet file 0600; make that true even if
|
||||
// it already existed with looser bits.
|
||||
harden_wallet_file(&self.wallet_dir.join(&self.wallet_filename));
|
||||
// Do not hand back a client whose port is still closed: `pick_port` only
|
||||
// proved the port was free, not that the child bound it.
|
||||
Self::loopback_listener_ready(port, WALLET_RPC_LISTENER_TIMEOUT, "monero-wallet-rpc")?;
|
||||
Ok(Some(WalletClient {
|
||||
url: format!("http://{user}:{}@127.0.0.1:{port}/json_rpc", pass.as_str()),
|
||||
no_spend: false,
|
||||
|
|
|
|||
Loading…
Reference in a new issue