@@ -12,7 +12,7 @@ use std::{
1212 task:: { Context , Poll } ,
1313} ;
1414
15- use tokio:: { net:: UdpSocket , stream :: Stream , sync:: mpsc} ;
15+ use tokio:: { net:: UdpSocket , sync:: mpsc} ;
1616
1717use super :: { DEFAULT_TTL , MDNS_PORT } ;
1818use crate :: address_family:: AddressFamily ;
@@ -221,7 +221,7 @@ impl<AF: Unpin + AddressFamily> Future for FSM<AF> {
221221 type Output = ( ) ;
222222 fn poll ( self : Pin < & mut Self > , cx : & mut Context ) -> Poll < ( ) > {
223223 let pinned = Pin :: get_mut ( self ) ;
224- while let Poll :: Ready ( cmd) = Pin :: new ( & mut pinned. commands ) . poll_next ( cx) {
224+ while let Poll :: Ready ( cmd) = Pin :: new ( & mut pinned. commands ) . poll_recv ( cx) {
225225 match cmd {
226226 Some ( Command :: Shutdown ) => return Poll :: Ready ( ( ) ) ,
227227 Some ( Command :: SendUnsolicited {
@@ -243,7 +243,7 @@ impl<AF: Unpin + AddressFamily> Future for FSM<AF> {
243243 Err ( e) => error ! ( "ResponderRecvPacket Error: {:?}" , e) ,
244244 }
245245
246- while let Some ( ( ref response, ref addr) ) = pinned. outgoing . pop_front ( ) {
246+ while let Some ( ( ref response, addr) ) = pinned. outgoing . pop_front ( ) {
247247 trace ! ( "sending packet to {:?}" , addr) ;
248248
249249 match pinned. socket . poll_send_to ( cx, response, addr) {
0 commit comments