mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
overall cleanup, more tests, fixing clashes, removing unwraps, hardening against protocol errors, prepare prio mgr to take commands from scheduler
fix async_recv and double block_on panic on Network::drop and participant::drop include Cargo.lock from all examples Found a bug on imbris runners with doc tests of `stream::send` and `stream::recv` As neither a backtrace, nor tracing on runners in the doc tests seems to help, i disable them and add them as unit tests
This commit is contained in:
1
network/examples/fileshare/Cargo.lock
generated
1
network/examples/fileshare/Cargo.lock
generated
@ -1010,7 +1010,6 @@ version = "0.1.0"
|
||||
dependencies = [
|
||||
"async-std",
|
||||
"bincode",
|
||||
"byteorder",
|
||||
"futures",
|
||||
"lazy_static",
|
||||
"prometheus",
|
||||
|
@ -17,6 +17,6 @@ futures = "0.3"
|
||||
tracing = "0.1"
|
||||
tracing-subscriber = "0.2.3"
|
||||
bincode = "1.2"
|
||||
serde = "1.0"
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
rand = "0.7.3"
|
||||
shellexpand = "2.0.0"
|
@ -1,5 +1,8 @@
|
||||
#![feature(async_closure, exclusive_range_pattern)]
|
||||
|
||||
//!run with
|
||||
//! (cd network/examples/fileshare && RUST_BACKTRACE=1 cargo run --profile=release -Z unstable-options -- --trace=info --port 15006)
|
||||
//! (cd network/examples/fileshare && RUST_BACKTRACE=1 cargo run --profile=release -Z unstable-options -- --trace=info --port 15007)
|
||||
//! ```
|
||||
use async_std::{io, path::PathBuf};
|
||||
use clap::{App, Arg, SubCommand};
|
||||
use futures::{
|
||||
@ -152,7 +155,7 @@ async fn client(mut cmd_sender: mpsc::UnboundedSender<LocalCommand>) {
|
||||
cmd_sender.send(LocalCommand::Disconnect).await.unwrap();
|
||||
},
|
||||
("connect", Some(connect_matches)) => {
|
||||
let socketaddr = connect_matches.value_of("ipport").unwrap().parse().unwrap();
|
||||
let socketaddr = connect_matches.value_of("ip:port").unwrap().parse().unwrap();
|
||||
cmd_sender
|
||||
.send(LocalCommand::Connect(Address::Tcp(socketaddr)))
|
||||
.await
|
||||
|
@ -28,7 +28,7 @@ impl Server {
|
||||
let (command_sender, command_receiver) = mpsc::unbounded();
|
||||
|
||||
let thread_pool = ThreadPoolBuilder::new().build();
|
||||
let network = Network::new(Pid::new(), &thread_pool);
|
||||
let network = Network::new(Pid::new(), &thread_pool, None);
|
||||
|
||||
let run_channels = Some(ControlChannels { command_receiver });
|
||||
(
|
||||
|
Reference in New Issue
Block a user