Skip to content

Commit

Permalink
chore: update deps
Browse files Browse the repository at this point in the history
  • Loading branch information
Devdutt Shenoi committed Apr 30, 2024
1 parent 69f4e1c commit bca386d
Show file tree
Hide file tree
Showing 5 changed files with 106 additions and 29 deletions.
119 changes: 98 additions & 21 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 uplink/Cargo.toml
Original file line number Diff line number Diff line change
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
6 changes: 3 additions & 3 deletions uplink/src/base/serializer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ impl<C: MqttClient> Serializer<C> {

// TODO(RT): This can fail when packet sizes > max_payload_size in config are written to disk.
// This leads to force switching to normal mode. Increasing max_payload_size to bypass this
let publish = match read(storage.reader(), max_packet_size) {
let publish = match Packet::read(storage.reader(), max_packet_size) {
Ok(Packet::Publish(publish)) => publish,
Ok(packet) => unreachable!("Unexpected packet: {:?}", packet),
Err(e) => {
Expand Down Expand Up @@ -505,7 +505,7 @@ impl<C: MqttClient> Serializer<C> {
_ => return Ok(Status::Normal),
};

let publish = match read(storage.reader(), max_packet_size) {
let publish = match Packet::read(storage.reader(), max_packet_size) {
Ok(Packet::Publish(publish)) => publish,
Ok(packet) => unreachable!("Unexpected packet: {:?}", packet),
Err(e) => {
Expand Down Expand Up @@ -925,7 +925,7 @@ mod test {
panic!("No publishes found in storage");
}

match read(storage.reader(), max_packet_size) {
match Packet::read(storage.reader(), max_packet_size) {
Ok(Packet::Publish(publish)) => return publish,
v => {
panic!("Failed to read publish from storage. read: {:?}", v);
Expand Down

0 comments on commit bca386d

Please sign in to comment.