Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bytes 1.0 and prost 0.7, actix next, Tokio 1.0 #55

Merged
merged 6 commits into from Jan 24, 2021
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 7 additions & 7 deletions libsignal-service-actix/Cargo.toml
Expand Up @@ -10,15 +10,15 @@ edition = "2018"
libsignal-service = { path = "../libsignal-service" }
libsignal-protocol = { git = "https://github.com/Michael-F-Bryan/libsignal-protocol-rs" }

awc = { version = "2.0.0", features=["rustls"] }
actix = "0.10.0"
actix-http = "2.1.0"
actix-rt = "1.1"
awc = { version = "3.0.0-beta.1", features=["rustls"] }
actix = "0.11.0-beta.1"
actix-http = "3.0.0-beta.1"
actix-rt = "2.0.0-beta.1"
mpart-async = "0.4.2"
serde_json = "1.0"
futures = "0.3"
bytes = "0.5"
rustls = "0.18"
bytes = "1"
rustls = "0.19"
url = "2.1"
serde = "1.0"
log = "0.4.8"
Expand All @@ -36,4 +36,4 @@ opener = "0.4"
qrcode = "0.12"
rand = "0.8"
structopt = "0.3"
tokio = { version = "0.2", features=["macros"] }
tokio = { version = "1", features=["macros"] }
7 changes: 4 additions & 3 deletions libsignal-service-actix/src/websocket.rs
Expand Up @@ -67,12 +67,13 @@ where
let mut ka_interval = actix::clock::interval_at(
actix::clock::Instant::now(),
push_service::KEEPALIVE_TIMEOUT_SECONDS,
)
.fuse();
);

loop {
let tick = ka_interval.tick().fuse();
futures::pin_mut!(tick);
futures::select! {
_ = ka_interval.next() => {
_ = tick => {
Copy link
Member Author

@rubdos rubdos Jan 8, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gferon What do you think about this? tokio-rs/tokio@7f17822 adds a stream implementation again, but this may be cleaner...

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well, this is what's supposed to land as std::future::Stream rather sooner than later, so it's not part of tokio 1.0, or did I misunderstand what you meant?

log::trace!("Triggering keep-alive");
if let Err(e) = incoming_sink.send(WebSocketStreamItem::KeepAliveRequest).await {
log::info!("Websocket sink has closed: {:?}.", e);
Expand Down
8 changes: 4 additions & 4 deletions libsignal-service/Cargo.toml
Expand Up @@ -11,13 +11,13 @@ libsignal-protocol = { git = "https://github.com/Michael-F-Bryan/libsignal-proto
async-trait = "0.1.30"
url = { version = "2.1.1", features = ["serde"] }
base64 = "0.13"
bytes = "0.5"
bytes = "1"
futures = "0.3"
pin-project = "1.0"
thiserror = "1.0"
serde = {version = "1.0", features=["derive"]}
prost = "0.6"
http = "0.2.1"
prost = "0.7"
http = "0.2.2"
log = "0.4.8"

sha2 = "0.9.0"
Expand All @@ -29,7 +29,7 @@ block-modes = "0.7.0"
rand = "0.8.0"

[build-dependencies]
prost-build = "0.6"
prost-build = "0.7"

[dev-dependencies]
anyhow = "1.0"
Expand Down