ソースを参照

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

darkfi 1 年間 前
コミット
d8516a474d
1 ファイル変更4 行追加4 行削除
  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
             }