mirror of
https://github.com/romanz/electrs.git
synced 2025-02-24 23:08:39 +01:00
Rename a variable for readability
This commit is contained in:
parent
0340dd87c8
commit
7908877000
1 changed files with 2 additions and 2 deletions
|
@ -391,13 +391,13 @@ impl RPC {
|
|||
|
||||
fn start_acceptor(addr: SocketAddr) -> Channel<Option<(TcpStream, SocketAddr)>> {
|
||||
let chan = Channel::new();
|
||||
let tx = chan.sender();
|
||||
let acceptor = chan.sender();
|
||||
thread::spawn(move || {
|
||||
let listener = TcpListener::bind(addr).expect(&format!("bind({}) failed", addr));
|
||||
info!("RPC server running on {}", addr);
|
||||
loop {
|
||||
let (stream, addr) = listener.accept().expect("accept failed");
|
||||
tx.send(Some((stream, addr))).expect("send failed");
|
||||
acceptor.send(Some((stream, addr))).expect("send failed");
|
||||
}
|
||||
});
|
||||
chan
|
||||
|
|
Loading…
Add table
Reference in a new issue