Parcourir la source

app: darkirc sync_dag loop, show error when channel_sub is closed.

darkfi il y a 1 an
Parent
commit
d8516a474d
1 fichiers modifiés avec 4 ajouts et 4 suppressions
  1. 4 4
      bin/app/src/plugin/darkirc.rs

+ 4 - 4
bin/app/src/plugin/darkirc.rs

@@ -284,8 +284,8 @@ impl DarkIrc {
         let mut sync_attempt = 0;
         loop {
             // Wait for a channel
-            if let Err(_) = channel_sub.receive().await {
-                e!("There was an error listening for channels. The service closed unexpectedly.");
+            if let Err(err) = channel_sub.receive().await {
+                e!("There was an error listening for channels. The service closed unexpectedly with error: {err}");
                 // Not sure what to do here
                 return
             }
@@ -325,8 +325,8 @@ impl DarkIrc {
         // Initial sync finished. Now just notify of connection changes
         loop {
             // Wait for a channel
-            if let Err(_) = channel_sub.receive().await {
-                e!("There was an error listening for channels. The service closed unexpectedly.");
+            if let Err(err) = channel_sub.receive().await {
+                e!("There was an error listening for channels. The service closed unexpectedly with error: {err}");
                 // Not sure what to do here
                 return
             }