File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -459,26 +459,18 @@ mod tests {
459459 // try.
460460
461461 use std:: net:: TcpListener ;
462- use std:: sync:: mpsc:: channel;
463462 use std:: time:: { Duration , Instant } ;
464463
465464 let endpoint =
466465 std:: env:: var ( "TEST_ELECTRUM_TIMEOUT_PORT" ) . unwrap_or ( "localhost:60000" . into ( ) ) ;
467- let ( sender, receiver) = channel ( ) ;
468466
467+ let listener = TcpListener :: bind ( "127.0.0.1:60000" ) . unwrap ( ) ;
469468 std:: thread:: spawn ( move || {
470- let listener = TcpListener :: bind ( "127.0.0.1:60000" ) . unwrap ( ) ;
471- sender. send ( ( ) ) . unwrap ( ) ;
472-
473469 for _stream in listener. incoming ( ) {
474470 std:: thread:: sleep ( Duration :: from_secs ( 60 ) )
475471 }
476472 } ) ;
477473
478- receiver
479- . recv_timeout ( Duration :: from_secs ( 5 ) )
480- . expect ( "Can't start local listener" ) ;
481-
482474 let now = Instant :: now ( ) ;
483475 let client = Client :: from_config (
484476 & endpoint,
You can’t perform that action at this time.
0 commit comments