Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@

- Update `libp2p-core`, `libp2p-floodsub`, `libp2p-gossipsub`, `libp2p-mplex`,
`libp2p-noise`, `libp2p-plaintext`, `libp2p-pnet`, `libp2p-request-response`,
`libp2p-swarm`, `libp2p-tcp`, `libp2p-websocket` and `parity-multiaddr`.
`libp2p-swarm`, `libp2p-tcp`, `libp2p-uds`, `libp2p-websocket` and
`parity-multiaddr`.

# Version 0.28.1 [2020-09-10]

Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ libp2p-websocket = { version = "0.24.0", path = "transports/websocket", optional
[dev-dependencies]
async-std = "1.6.2"
env_logger = "0.8.1"
tokio = { version = "0.2", features = ["io-util", "io-std", "stream", "macros"] }
tokio = { version = "0.3", features = ["io-util", "io-std", "stream", "macros"] }

[workspace]
members = [
Expand Down
3 changes: 2 additions & 1 deletion protocols/mdns/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@ log = "0.4"
net2 = "0.2"
rand = "0.7"
smallvec = "1.0"
tokio = { version = "0.2", default-features = false, features = ["udp"], optional = true }
tokio = { version = "0.3", default-features = false, features = ["net"], optional = true }
void = "1.0"
wasm-timer = "0.2.4"

[dev-dependencies]
if-addrs = "0.6.4"
tokio = { version = "0.3", default-features = false, features = ["rt", "rt-multi-thread"] }
2 changes: 1 addition & 1 deletion transports/tcp/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ ipnet = "2.0.0"
libp2p-core = { version = "0.23.0", path = "../../core" }
log = "0.4.1"
socket2 = "0.3.12"
tokio = { version = "0.2", default-features = false, features = ["tcp"], optional = true }
tokio = { version = "0.3", default-features = false, features = ["net"], optional = true }

[dev-dependencies]
libp2p-tcp = { path = ".", features = ["async-std"] }
Expand Down
6 changes: 5 additions & 1 deletion transports/tcp/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,11 @@ impl AsyncWrite for TcpTransStream {
#[cfg(feature = "tokio")]
impl AsyncRead for TokioTcpTransStream {
fn poll_read(mut self: Pin<&mut Self>, cx: &mut Context, buf: &mut [u8]) -> Poll<Result<usize, io::Error>> {
tokio::io::AsyncRead::poll_read(Pin::new(&mut self.inner), cx, buf)
// Adapted from
// https://github.com/tokio-rs/tokio/blob/6d99e1c7dec4c6a37c4c7bf2801bc82cc210351d/tokio-util/src/compat.rs#L126.
let mut read_buf = tokio::io::ReadBuf::new(buf);
futures::ready!(tokio::io::AsyncRead::poll_read(Pin::new(&mut self.inner), cx, &mut read_buf))?;
Poll::Ready(Ok(read_buf.filled().len()))
}
}

Expand Down
2 changes: 1 addition & 1 deletion transports/uds/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ async-std = { version = "1.6.2", optional = true }
libp2p-core = { version = "0.23.0", path = "../../core" }
log = "0.4.1"
futures = "0.3.1"
tokio = { version = "0.2", default-features = false, features = ["uds"], optional = true }
tokio = { version = "0.3", default-features = false, features = ["net"], optional = true }

[target.'cfg(all(unix, not(target_os = "emscripten")))'.dev-dependencies]
tempfile = "3.0"
Expand Down