@@ -422,6 +422,9 @@ impl Actor {
422
422
trace ! ( "handle to_actor {msg:?}" ) ;
423
423
match msg {
424
424
ToActor :: ConnIncoming ( peer_id, origin, conn) => {
425
+ if peer_id == self . endpoint . node_id ( ) {
426
+ tracing:: error!( "Incoming connection from self! How can this happen !!??" ) ;
427
+ }
425
428
self . conns . insert ( peer_id, conn. clone ( ) ) ;
426
429
self . dialer . abort_dial ( & peer_id) ;
427
430
let ( send_tx, send_rx) = mpsc:: channel ( SEND_QUEUE_CAP ) ;
@@ -521,6 +524,9 @@ impl Actor {
521
524
}
522
525
} else {
523
526
debug ! ( peer = ?peer_id, "dial" ) ;
527
+ if peer_id == self . endpoint . node_id ( ) {
528
+ tracing:: error!( "Trying to dial self, this will fail! and should not happen in the first place !?" ) ;
529
+ }
524
530
self . dialer . queue_dial ( peer_id, GOSSIP_ALPN ) ;
525
531
// TODO: Enforce max length
526
532
self . pending_sends . entry ( peer_id) . or_default ( ) . push ( message) ;
@@ -744,7 +750,7 @@ mod test {
744
750
go2. join ( topic, vec ! [ pi1] ) . await . unwrap ( ) . await . unwrap ( ) ;
745
751
go3. join ( topic, vec ! [ pi1] ) . await . unwrap ( ) . await . unwrap ( ) ;
746
752
747
- let len = 10 ;
753
+ let len = 2 ;
748
754
749
755
// subscribe nodes 2 and 3 to the topic
750
756
let mut stream2 = go2. subscribe ( topic) . await . unwrap ( ) ;
0 commit comments