@@ -154,10 +154,6 @@ impl Iroh {
154
154
155
155
self . gossip . broadcast ( topic, data. into ( ) ) . await ?;
156
156
157
- if env:: var ( "REALTIME_DEBUG" ) . is_ok ( ) {
158
- info ! ( ctx, "Sent realtime data" ) ;
159
- }
160
-
161
157
Ok ( ( ) )
162
158
}
163
159
@@ -353,7 +349,9 @@ pub async fn send_webxdc_realtime_advertisement(
353
349
msg. param . set_cmd ( SystemMessage :: IrohNodeAddr ) ;
354
350
msg. in_reply_to = Some ( webxdc. rfc724_mid . clone ( ) ) ;
355
351
send_msg ( ctx, webxdc. chat_id , & mut msg) . await ?;
356
- info ! ( ctx, "IROH_REALTIME: Sent realtime advertisement" ) ;
352
+ if env:: var ( "REALTIME_DEBUG" ) . is_ok ( ) {
353
+ info ! ( ctx, "IROH_REALTIME: Sent realtime advertisement" ) ;
354
+ }
357
355
Ok ( conn)
358
356
}
359
357
@@ -369,6 +367,7 @@ pub async fn leave_webxdc_realtime(ctx: &Context, msg_id: MsgId) -> Result<()> {
369
367
let iroh = ctx. get_or_try_init_peer_channel ( ) . await ?;
370
368
iroh. leave_realtime ( get_iroh_topic_for_msg ( ctx, msg_id) . await ?)
371
369
. await ?;
370
+
372
371
info ! ( ctx, "IROH_REALTIME: Left gossip for message {msg_id}" ) ;
373
372
374
373
Ok ( ( ) )
@@ -436,11 +435,12 @@ async fn subscribe_loop(
436
435
let event = stream. recv ( ) . await ?;
437
436
match event {
438
437
IrohEvent :: NeighborUp ( node) => {
439
- info ! ( context, "IROH_REALTIME: NeighborUp: {}" , node. to_string( ) ) ;
440
438
iroh_add_peer_for_topic ( context, msg_id, topic, node, None ) . await ?;
441
439
}
442
440
IrohEvent :: Received ( event) => {
443
- info ! ( context, "IROH_REALTIME: Received realtime data" ) ;
441
+ if env:: var ( "REALTIME_DEBUG" ) . is_ok ( ) {
442
+ info ! ( context, "IROH_REALTIME: Received realtime data" ) ;
443
+ }
444
444
context. emit_event ( EventType :: WebxdcRealtimeData {
445
445
msg_id,
446
446
data : event
0 commit comments