Skip to content

Commit

Permalink
Merge branch 'main' into cancellation
Browse files Browse the repository at this point in the history
  • Loading branch information
Devdutt Shenoi authored May 3, 2024
2 parents 2cf547a + 513f4c2 commit eb0944f
Show file tree
Hide file tree
Showing 7 changed files with 157 additions and 82 deletions.
121 changes: 99 additions & 22 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ serde_json = "1.0"
tempdir = "0.3"
thiserror = "1"
tokio = { version = "1", features = ["rt-multi-thread", "process"] }
tokio-stream = "0.1"
tokio-stream = "0.1.15"
tokio-util = { version = "0.7", features = ["codec", "time"] }

[profile.dev]
Expand Down
2 changes: 1 addition & 1 deletion storage/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ mod test {
break;
}

match read(storage.reader(), 1048).unwrap() {
match Packet::read(storage.reader(), 1048).unwrap() {
Packet::Publish(p) => publishes.push(p),
packet => unreachable!("{:?}", packet),
}
Expand Down
4 changes: 2 additions & 2 deletions uplink/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "uplink"
version = "2.12.0"
version = "2.12.1"
authors = ["tekjar <[email protected]>"]
edition = "2021"

Expand Down Expand Up @@ -32,7 +32,7 @@ storage = { path = "../storage" }
log = { workspace = true }
regex = "1.7.1"
tracing = { version="0.1", features=["log"] }
tracing-subscriber = { version="=0.3.14", features=["env-filter"] }
tracing-subscriber = { version="0.3.18", features=["env-filter"] }

# built-in collectors
# tunshell
Expand Down
6 changes: 3 additions & 3 deletions uplink/src/base/mqtt/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ use std::path::Path;

use crate::{Action, Config};
use rumqttc::{
read, AsyncClient, ConnectionError, Event, EventLoop, Incoming, MqttOptions, Packet, Publish,
QoS, Request, TlsConfiguration, Transport,
AsyncClient, ConnectionError, Event, EventLoop, Incoming, MqttOptions, Packet, Publish, QoS,
Request, TlsConfiguration, Transport,
};
use std::sync::Arc;

Expand Down Expand Up @@ -138,7 +138,7 @@ impl Mqtt {
let max_packet_size = self.config.mqtt.max_packet_size;
loop {
// NOTE: This can fail when packet sizes > max_payload_size in config are written to disk.
match read(&mut buf, max_packet_size) {
match Packet::read(&mut buf, max_packet_size) {
Ok(Packet::Publish(publish)) => {
self.eventloop.pending.push_back(Request::Publish(publish))
}
Expand Down
Loading

0 comments on commit eb0944f

Please sign in to comment.