Skip to content

Commit

Permalink
💩 zb: Panic on client handshake w/ extra bytes after handshake
Browse files Browse the repository at this point in the history
There is something strange happening with gdbus so this commit is to
check what bytes we're left with after handshake that causes the issue.
  • Loading branch information
zeenix committed Mar 25, 2024
1 parent c9eae0d commit 3fe0618
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions zbus/src/connection/handshake.rs
Original file line number Diff line number Diff line change
Expand Up @@ -467,6 +467,13 @@ impl Handshake for ClientHandshake {
}
}

if !self.common.recv_buffer.is_empty() {
panic!(
"Received extra data from the server: {:?}",
self.common.recv_buffer
);
}

trace!("Handshake done");
let (read, write) = self.common.socket.take();
Ok(Authenticated {
Expand Down

0 comments on commit 3fe0618

Please sign in to comment.