X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=lightning-net-tokio%2Fsrc%2Flib.rs;h=c2bac324bd3c245490797fb5daf02f3554a56859;hb=faaa4d207dd420b0a2a331ddd9c229eeb0ad26f7;hp=47e179189789f953f0944b017b0bc3a5ff9faaec;hpb=9666fcc5ceef516e343a9debe3b4a790b2d9a30d;p=rust-lightning diff --git a/lightning-net-tokio/src/lib.rs b/lightning-net-tokio/src/lib.rs index 47e17918..c2bac324 100644 --- a/lightning-net-tokio/src/lib.rs +++ b/lightning-net-tokio/src/lib.rs @@ -59,7 +59,7 @@ impl Connection { return future::Either::A(blocker.then(|_| { Ok(()) })); } } - //TODO: There's a race where we don't meet the requirements of disconnect_socket if its + //TODO: There's a race where we don't meet the requirements of socket_disconnected if its //called right here, after we release the us_ref lock in the scope above, but before we //call read_event! match peer_manager.read_event(&mut SocketDescriptor::new(us_ref.clone(), peer_manager.clone()), pending_read) { @@ -84,7 +84,7 @@ impl Connection { future::Either::B(future::result(Ok(()))) }).then(move |_| { if us_close_ref.lock().unwrap().need_disconnect { - peer_manager_ref.disconnect_event(&SocketDescriptor::new(us_close_ref, peer_manager_ref.clone())); + peer_manager_ref.socket_disconnected(&SocketDescriptor::new(us_close_ref, peer_manager_ref.clone())); println!("Peer disconnected!"); } else { println!("We disconnected peer!");