Update `io-reactor` and related dependencies
This commit is contained in:
parent
e6baeab0c9
commit
c400961cec
|
|
@ -652,6 +652,17 @@ dependencies = [
|
|||
"cypheraddr",
|
||||
"cyphergraphy",
|
||||
"eidolon-auth",
|
||||
"socks5-client",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "cyphernet"
|
||||
version = "0.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2c78f33bc1f1423741a6939ce6da2b6af2e7be4ff43e8878cf4bac1284028e93"
|
||||
dependencies = [
|
||||
"cypheraddr",
|
||||
"cyphergraphy",
|
||||
"noise-framework",
|
||||
"socks5-client",
|
||||
]
|
||||
|
|
@ -1247,9 +1258,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "io-reactor"
|
||||
version = "0.1.2"
|
||||
version = "0.2.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "15da7fc08622494b89ea0eb29a1bf37c8707410c5c09144d573cc45e4504fc8a"
|
||||
checksum = "850495a01d6f0b6d29adf5849a75b5a82449d9181bdd642cd681ce3d6f14b58c"
|
||||
dependencies = [
|
||||
"amplify",
|
||||
"crossbeam-channel",
|
||||
|
|
@ -1493,12 +1504,12 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "netservices"
|
||||
version = "0.2.2"
|
||||
version = "0.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "888832afc021aa978d7cfcf5cbe9a694c066e21ea503791e4b8fcc82c5b7bc6f"
|
||||
checksum = "1f8216a05f756d0c7c02743812f6db7f5dccb7cfe9f2b2612f4aaf85c7eb641a"
|
||||
dependencies = [
|
||||
"amplify",
|
||||
"cyphernet",
|
||||
"cyphernet 0.3.0",
|
||||
"io-reactor",
|
||||
"libc",
|
||||
"rand 0.8.5",
|
||||
|
|
@ -1516,9 +1527,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "noise-framework"
|
||||
version = "0.2.0"
|
||||
version = "0.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "daedd5a3c07ef713cb9c4b6f263837822d70412517576dcacd050fa0d1ba99bd"
|
||||
checksum = "a1bff54756fd54be6b45e160390d5ec3462331c2bf2aae26df78b4833e1206bb"
|
||||
dependencies = [
|
||||
"amplify",
|
||||
"chacha20poly1305",
|
||||
|
|
@ -1784,9 +1795,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "popol"
|
||||
version = "2.2.0"
|
||||
version = "3.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a953dd115cbe3b9d10340d47e6825a9700059a2fee12cee722975776caf3c531"
|
||||
checksum = "93406933502e4446250941cf95d5e62851feb62a25b742acf7ffce96755c53e3"
|
||||
dependencies = [
|
||||
"libc",
|
||||
]
|
||||
|
|
@ -1877,7 +1888,7 @@ version = "0.2.0"
|
|||
dependencies = [
|
||||
"amplify",
|
||||
"crossbeam-channel",
|
||||
"cyphernet",
|
||||
"cyphernet 0.2.0",
|
||||
"fastrand",
|
||||
"git2",
|
||||
"localtime",
|
||||
|
|
@ -1981,7 +1992,7 @@ name = "radicle-crypto"
|
|||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"amplify",
|
||||
"cyphernet",
|
||||
"cyphernet 0.2.0",
|
||||
"ec25519",
|
||||
"fastrand",
|
||||
"multibase",
|
||||
|
|
@ -2062,7 +2073,7 @@ dependencies = [
|
|||
"chrono",
|
||||
"colored",
|
||||
"crossbeam-channel",
|
||||
"cyphernet",
|
||||
"cyphernet 0.3.0",
|
||||
"fastrand",
|
||||
"io-reactor",
|
||||
"lexopt",
|
||||
|
|
|
|||
|
|
@ -17,14 +17,14 @@ byteorder = { version = "1" }
|
|||
chrono = { version = "0.4.0" }
|
||||
colored = { version = "1.9.0" }
|
||||
crossbeam-channel = { version = "0.5.6" }
|
||||
cyphernet = { version = "0.2.0", features = ["tor", "dns", "ed25519", "p2p-ed25519"] }
|
||||
cyphernet = { version = "0.3.0", features = ["tor", "dns", "ed25519", "p2p-ed25519"] }
|
||||
fastrand = { version = "1.9.0" }
|
||||
io-reactor = { version = "0.1.2", features = ["popol"] }
|
||||
io-reactor = { version = "0.2.1", features = ["popol"] }
|
||||
lexopt = { version = "0.2.1" }
|
||||
libc = { version = "0.2.137" }
|
||||
log = { version = "0.4.17", features = ["std"] }
|
||||
localtime = { version = "1.2.0" }
|
||||
netservices = { version = "0.2.2", features = ["io-reactor", "socket2"] }
|
||||
netservices = { version = "0.3.0", features = ["io-reactor", "socket2"] }
|
||||
nonempty = { version = "0.8.1", features = ["serialize"] }
|
||||
qcheck = { version = "1", default-features = false, optional = true }
|
||||
# N.b. this is required to use macros, even though it's re-exported
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ pub mod wire;
|
|||
pub mod worker;
|
||||
|
||||
pub use localtime::{LocalDuration, LocalTime};
|
||||
pub use netservices::LinkDirection as Link;
|
||||
pub use netservices::Direction as Link;
|
||||
pub use radicle::prelude::Timestamp;
|
||||
pub use radicle::{collections, crypto, git, identity, node, profile, rad, storage};
|
||||
pub use runtime::Runtime;
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@ pub struct Runtime {
|
|||
pub control: UnixListener,
|
||||
pub handle: Handle,
|
||||
pub storage: Storage,
|
||||
pub reactor: Reactor<wire::Control>,
|
||||
pub reactor: Reactor<wire::Control, popol::Poller>,
|
||||
pub daemon: net::SocketAddr,
|
||||
pub pool: worker::Pool,
|
||||
pub local_addrs: Vec<net::SocketAddr>,
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ use std::{fmt, io, time};
|
|||
|
||||
use crossbeam_channel as chan;
|
||||
use radicle::node::Seeds;
|
||||
use reactor::poller::popol::PopolWaker;
|
||||
use thiserror::Error;
|
||||
|
||||
use crate::identity::Id;
|
||||
|
|
@ -60,7 +61,7 @@ impl<T> From<chan::SendError<T>> for Error {
|
|||
|
||||
pub struct Handle {
|
||||
pub(crate) home: Home,
|
||||
pub(crate) controller: reactor::Controller<wire::Control>,
|
||||
pub(crate) controller: reactor::Controller<wire::Control, PopolWaker>,
|
||||
|
||||
/// Whether a shutdown was initiated or not. Prevents attempting to shutdown twice.
|
||||
shutdown: Arc<AtomicBool>,
|
||||
|
|
@ -95,7 +96,7 @@ impl Clone for Handle {
|
|||
impl Handle {
|
||||
pub fn new(
|
||||
home: Home,
|
||||
controller: reactor::Controller<wire::Control>,
|
||||
controller: reactor::Controller<wire::Control, PopolWaker>,
|
||||
emitter: Emitter<Event>,
|
||||
) -> Self {
|
||||
Self {
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ use std::sync::Arc;
|
|||
use std::time;
|
||||
|
||||
use crossbeam_channel as chan;
|
||||
use netservices::LinkDirection as Link;
|
||||
use netservices::Direction as Link;
|
||||
use radicle::storage::ReadRepository;
|
||||
|
||||
use crate::collections::{HashMap, HashSet};
|
||||
|
|
|
|||
|
|
@ -639,36 +639,15 @@ where
|
|||
err: reactor::Error<NetAccept<WireSession<G>>, NetTransport<WireSession<G>>>,
|
||||
) {
|
||||
match err {
|
||||
reactor::Error::ListenerUnknown(id) => {
|
||||
// TODO: What are we supposed to do here? Remove this error.
|
||||
log::error!(target: "wire", "Received error: unknown listener {}", id);
|
||||
}
|
||||
reactor::Error::TransportUnknown(id) => {
|
||||
// TODO: What are we supposed to do here? Remove this error.
|
||||
log::error!(target: "wire", "Received error: unknown peer {}", id);
|
||||
}
|
||||
reactor::Error::Poll(err) => {
|
||||
// TODO: This should be a fatal error, there's nothing we can do here.
|
||||
log::error!(target: "wire", "Can't poll connections: {}", err);
|
||||
}
|
||||
reactor::Error::ListenerPollError(id, _) => {
|
||||
// TODO: This should be a fatal error, there's nothing we can do here.
|
||||
log::error!(target: "wire", "Received error: listener {} disconnected", id);
|
||||
self.actions.push_back(Action::UnregisterListener(id));
|
||||
}
|
||||
reactor::Error::ListenerDisconnect(id, _, _) => {
|
||||
reactor::Error::ListenerDisconnect(id, _) => {
|
||||
// TODO: This should be a fatal error, there's nothing we can do here.
|
||||
log::error!(target: "wire", "Received error: listener {} disconnected", id);
|
||||
}
|
||||
reactor::Error::TransportPollError(fd, _) => {
|
||||
log::error!(target: "wire", "Received error: peer (fd={fd}) poll error");
|
||||
|
||||
self.disconnect(
|
||||
fd,
|
||||
DisconnectReason::Connection(Arc::new(io::Error::from(io::ErrorKind::Other))),
|
||||
)
|
||||
}
|
||||
reactor::Error::TransportDisconnect(fd, session, _) => {
|
||||
reactor::Error::TransportDisconnect(fd, session) => {
|
||||
log::error!(target: "wire", "Received error: peer (fd={fd}) disconnected");
|
||||
|
||||
// We're dropping the TCP connection here.
|
||||
|
|
@ -698,14 +677,6 @@ where
|
|||
}
|
||||
}
|
||||
}
|
||||
reactor::Error::WriteFailure(id, err) => {
|
||||
// TODO: Disconnect peer?
|
||||
log::error!(target: "wire", "Error during writing to peer {id}: {err}")
|
||||
}
|
||||
reactor::Error::WriteLogicError(id, _) => {
|
||||
// TODO: We shouldn't be receiving this error. There's nothing we can do.
|
||||
log::error!(target: "wire", "Write logic error for peer {id}: {err}")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue