@@ -95,12 +95,13 @@ where
9595 let conn_timeout_ticks = usize_to_u64 ( conn_timeout_ticks) . unwrap ( ) ;
9696 let mut fut_timeout = timer_stream
9797 . take ( conn_timeout_ticks)
98- . for_each ( |_| future:: ready ( ( ) ) ) ;
99- let mut fut_connect = connector. connect ( ( ) ) ;
98+ . for_each ( |_| future:: ready ( ( ) ) )
99+ . fuse ( ) ;
100+ let mut fut_connect = connector. connect ( ( ) ) . fuse ( ) ;
100101
101102 select ! {
102- fut_timeout => None ,
103- fut_connect => fut_connect,
103+ fut_timeout = fut_timeout = > None ,
104+ fut_connect = fut_connect = > fut_connect,
104105 }
105106}
106107
@@ -507,7 +508,7 @@ mod tests {
507508 async fn task_client_listener_basic ( mut spawner : impl Spawn + Clone + Send + ' static ) {
508509 let ( req_sender, mut req_receiver) = mpsc:: channel ( 0 ) ;
509510 let connector = DummyConnector :: new ( req_sender) ;
510- let ( connections_sender, mut connections_receiver) = mpsc:: channel ( 0 ) ;
511+ let ( connections_sender, connections_receiver) = mpsc:: channel ( 0 ) ;
511512 let conn_timeout_ticks = 8 ;
512513 let keepalive_ticks = 16 ;
513514 let ( tick_sender, tick_receiver) = mpsc:: channel ( 0 ) ;
@@ -587,7 +588,7 @@ mod tests {
587588 // Listener will accept the connection:
588589
589590 // Listener will open a connection to the relay:
590- let ( mut remote_sender, local_receiver) = mpsc:: channel ( 0 ) ;
591+ let ( remote_sender, local_receiver) = mpsc:: channel ( 0 ) ;
591592 let ( local_sender, mut remote_receiver) = mpsc:: channel ( 0 ) ;
592593 let conn_pair = ConnPair {
593594 sender : local_sender,
0 commit comments