Skip to content

Commit

Permalink
Merge pull request #2057 from bugadani/dns
Browse files Browse the repository at this point in the history
Wake Stack's polling task after queueing a DNS query
  • Loading branch information
Dirbaio authored Oct 14, 2023
2 parents 575db17 + 69bb455 commit f7c0ec6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion embassy-net/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,10 @@ impl<D: Driver> Stack<D> {
self.with_mut(|s, i| {
let socket = s.sockets.get_mut::<dns::Socket>(i.dns_socket);
match socket.start_query(s.iface.context(), name, qtype) {
Ok(handle) => Poll::Ready(Ok(handle)),
Ok(handle) => {
s.waker.wake();
Poll::Ready(Ok(handle))
}
Err(dns::StartQueryError::NoFreeSlot) => {
i.dns_waker.register(cx.waker());
Poll::Pending
Expand Down

0 comments on commit f7c0ec6

Please sign in to comment.