Skip to content

Commit

Permalink
fix(example): use right port for MQTTv5 connection. And make the erro…
Browse files Browse the repository at this point in the history
…r more descriptive (#518)
  • Loading branch information
henil committed Dec 2, 2022
1 parent 5af634e commit dcb0cdc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion rumqttc/examples/asyncpubsub_v5.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ async fn main() -> Result<(), Box<dyn Error>> {
pretty_env_logger::init();
// color_backtrace::install();

let mut mqttoptions = MqttOptions::new("test-1", "localhost", 1883);
let mut mqttoptions = MqttOptions::new("test-1", "localhost", 1884);
mqttoptions.set_keep_alive(Duration::from_secs(5));

let (client, mut eventloop) = AsyncClient::new(mqttoptions, 10);
Expand Down
2 changes: 1 addition & 1 deletion rumqttd/src/protocol/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -681,7 +681,7 @@ pub enum Error {
InvalidRemainingLength(usize),
#[error("Invalid protocol used")]
InvalidProtocol,
#[error("Invalid protocol level")]
#[error("Invalid protocol level {0}. Make sure right port is being used.")]
InvalidProtocolLevel(u8),
#[error("Invalid packet format")]
IncorrectPacketFormat,
Expand Down

0 comments on commit dcb0cdc

Please sign in to comment.