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:
15
network/examples/chat/Cargo.lock
generated
15
network/examples/chat/Cargo.lock
generated
@ -704,20 +704,6 @@ name = "serde"
|
||||
version = "1.0.106"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "36df6ac6412072f67cf767ebbde4133a5b2e88e76dc6187fa7104cd16f783399"
|
||||
dependencies = [
|
||||
"serde_derive",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "serde_derive"
|
||||
version = "1.0.106"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9e549e3abf4fb8621bd1609f11dfc9f5e50320802273b12f3811a67e6716ea6c"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "serde_json"
|
||||
@ -919,7 +905,6 @@ version = "0.1.0"
|
||||
dependencies = [
|
||||
"async-std",
|
||||
"bincode",
|
||||
"byteorder",
|
||||
"futures",
|
||||
"lazy_static",
|
||||
"prometheus",
|
||||
|
@ -1,3 +1,8 @@
|
||||
//!run with
|
||||
//! ```bash
|
||||
//! (cd network/examples/chat && RUST_BACKTRACE=1 cargo run --release -- --trace=info --port 15006)
|
||||
//! (cd network/examples/chat && RUST_BACKTRACE=1 cargo run --release -- --trace=info --port 15006 --mode=client)
|
||||
//! ```
|
||||
use async_std::io;
|
||||
use clap::{App, Arg};
|
||||
use futures::executor::{block_on, ThreadPool};
|
||||
@ -96,7 +101,7 @@ fn main() {
|
||||
|
||||
fn server(address: Address) {
|
||||
let thread_pool = ThreadPoolBuilder::new().build();
|
||||
let server = Arc::new(Network::new(Pid::new(), &thread_pool));
|
||||
let server = Arc::new(Network::new(Pid::new(), &thread_pool, None));
|
||||
let pool = ThreadPool::new().unwrap();
|
||||
block_on(async {
|
||||
server.listen(address).await.unwrap();
|
||||
@ -135,7 +140,7 @@ async fn client_connection(network: Arc<Network>, participant: Arc<Participant>)
|
||||
|
||||
fn client(address: Address) {
|
||||
let thread_pool = ThreadPoolBuilder::new().build();
|
||||
let client = Network::new(Pid::new(), &thread_pool);
|
||||
let client = Network::new(Pid::new(), &thread_pool, None);
|
||||
let pool = ThreadPool::new().unwrap();
|
||||
|
||||
block_on(async {
|
||||
|
Reference in New Issue
Block a user