Wake stack's task after queueing a DNS query
This commit is contained in:
parent
575db17264
commit
69bb455c60
1 changed files with 4 additions and 1 deletions
|
@ -509,7 +509,10 @@ impl<D: Driver> Stack<D> {
|
||||||
self.with_mut(|s, i| {
|
self.with_mut(|s, i| {
|
||||||
let socket = s.sockets.get_mut::<dns::Socket>(i.dns_socket);
|
let socket = s.sockets.get_mut::<dns::Socket>(i.dns_socket);
|
||||||
match socket.start_query(s.iface.context(), name, qtype) {
|
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) => {
|
Err(dns::StartQueryError::NoFreeSlot) => {
|
||||||
i.dns_waker.register(cx.waker());
|
i.dns_waker.register(cx.waker());
|
||||||
Poll::Pending
|
Poll::Pending
|
||||||
|
|
Loading…
Reference in a new issue