mirror of
https://github.com/embassy-rs/embassy.git
synced 2024-11-22 06:42:32 +00:00
Merge pull request #2104 from glaeqen/slow-dhcp
net: Reset DHCP socket when the link up is detected
This commit is contained in:
commit
64ab23d17d
@ -860,6 +860,9 @@ impl<D: Driver> Inner<D> {
|
||||
let socket = s.sockets.get_mut::<dhcpv4::Socket>(dhcp_handle);
|
||||
|
||||
if self.link_up {
|
||||
if old_link_up != self.link_up {
|
||||
socket.reset();
|
||||
}
|
||||
match socket.poll() {
|
||||
None => {}
|
||||
Some(dhcpv4::Event::Deconfigured) => {
|
||||
|
Loading…
Reference in New Issue
Block a user