Skip to content

Commit

Permalink
Review feedback.
Browse files Browse the repository at this point in the history
# Building wheels and fs_util will be skipped. Delete if not intended.
[ci skip-build-wheels]
  • Loading branch information
stuhood committed Sep 24, 2021
1 parent 918eab6 commit e934eae
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/rust/engine/process_execution/src/nailgun/nailgun_pool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Licensed under the Apache License, Version 2.0 (see LICENSE).

use std::io::{self, BufRead, Read};
use std::net::SocketAddr;
use std::net::{IpAddr, Ipv4Addr, SocketAddr};
use std::os::unix::process::ExitStatusExt;
use std::path::{Path, PathBuf};
use std::process::Stdio;
Expand Down Expand Up @@ -30,7 +30,7 @@ struct PoolEntry {
process: Arc<Mutex<NailgunProcess>>,
}

pub type Port = usize;
pub type Port = u16;

///
/// A NailgunPool contains a small Vec of running NailgunProcess instances, fingerprinted with the
Expand Down Expand Up @@ -365,7 +365,7 @@ impl BorrowedNailgunProcess {

pub fn address(&self) -> SocketAddr {
let port = self.0.as_ref().unwrap().port;
format!("127.0.0.1:{:?}", port).parse().unwrap()
SocketAddr::new(IpAddr::V4(Ipv4Addr::LOCALHOST), port)
}

pub fn workdir_path(&self) -> &Path {
Expand Down
4 changes: 2 additions & 2 deletions src/rust/engine/process_executor/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,8 @@ struct Opt {
#[structopt(long, default_value = "128")]
cache_rpc_concurrency: usize,

/// If set, use run the process through a Nailgun server.
/// This will likely start a new Nailgun server as a side effect.
/// If set, run the process through a Nailgun server with the given digest.
/// This will start a new Nailgun server as a side effect, but will tear it down on exit.
#[structopt(long)]
use_nailgun_digest: Option<Fingerprint>,

Expand Down

0 comments on commit e934eae

Please sign in to comment.