File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -451,26 +451,18 @@ mod tests {
451451 // try.
452452
453453 use std:: net:: TcpListener ;
454- use std:: sync:: mpsc:: channel;
455454 use std:: time:: { Duration , Instant } ;
456455
457456 let endpoint =
458457 std:: env:: var ( "TEST_ELECTRUM_TIMEOUT_PORT" ) . unwrap_or ( "localhost:60000" . into ( ) ) ;
459- let ( sender, receiver) = channel ( ) ;
460458
459+ let listener = TcpListener :: bind ( "127.0.0.1:60000" ) . unwrap ( ) ;
461460 std:: thread:: spawn ( move || {
462- let listener = TcpListener :: bind ( "127.0.0.1:60000" ) . unwrap ( ) ;
463- sender. send ( ( ) ) . unwrap ( ) ;
464-
465461 for _stream in listener. incoming ( ) {
466462 std:: thread:: sleep ( Duration :: from_secs ( 60 ) )
467463 }
468464 } ) ;
469465
470- receiver
471- . recv_timeout ( Duration :: from_secs ( 5 ) )
472- . expect ( "Can't start local listener" ) ;
473-
474466 let now = Instant :: now ( ) ;
475467 let client = Client :: from_config (
476468 & endpoint,
You can’t perform that action at this time.
0 commit comments