mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-04-03 15:41:27 +03:00
finish tcp rendezvous keep alive logic following mqtt, but defined by
server so that it can be easily to be controlled at server side.
This commit is contained in:
@@ -330,6 +330,9 @@ impl Encrypt {
|
||||
}
|
||||
|
||||
pub fn dec(&mut self, bytes: &mut BytesMut) -> Result<(), Error> {
|
||||
if bytes.is_empty() {
|
||||
return Ok(());
|
||||
}
|
||||
self.2 += 1;
|
||||
let nonce = FramedStream::get_nonce(self.2);
|
||||
match secretbox::open(bytes, &nonce, &self.0) {
|
||||
|
||||
Reference in New Issue
Block a user