Fixing UDP reopening bug

This commit is contained in:
Ryan Summers 2021-06-21 13:18:36 +02:00
parent 507f1f2b6c
commit 9d34e755d8
3 changed files with 3 additions and 4 deletions

2
Cargo.lock generated
View File

@ -754,7 +754,7 @@ dependencies = [
[[package]]
name = "smoltcp-nal"
version = "0.1.0"
source = "git+https://github.com/quartiq/smoltcp-nal.git?rev=2967c6e#2967c6e9abe580b207e742bb885a03845fa7344c"
source = "git+https://github.com/quartiq/smoltcp-nal.git?rev=5baf55f#5baf55fafbfe2c08d9fe56c836171e9d2fb468e8"
dependencies = [
"embedded-nal",
"heapless 0.7.1",

View File

@ -73,7 +73,7 @@ rev = "2750533"
[dependencies.smoltcp-nal]
git = "https://github.com/quartiq/smoltcp-nal.git"
rev = "2967c6e"
rev = "5baf55f"
[dependencies.minimq]
git = "https://github.com/quartiq/minimq.git"

View File

@ -15,7 +15,6 @@
///! non-sequential batch, it does not enqueue it into the packet and instead transmits any staged
///! data. The non-sequential batch is then transmitted in a new UDP packet. This method allows a
///! receiver to detect dropped batches (e.g. due to processing overhead).
use core::borrow::BorrowMut;
use heapless::spsc::{Consumer, Producer, Queue};
use miniconf::MiniconfAtomic;
use serde::Deserialize;
@ -346,7 +345,7 @@ impl DataStream {
}
// Transmit the data block.
let mut handle = self.socket.borrow_mut().unwrap();
let mut handle = self.socket.as_mut().unwrap();
let size = packet.finish();
self.stack.send(&mut handle, &self.buffer[..size]).ok();
}