Skip to content

Commit

Permalink
Better error logging
Browse files Browse the repository at this point in the history
  • Loading branch information
benthecarman committed Feb 17, 2024
1 parent 436caae commit 740341f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -193,13 +193,15 @@ async fn event_loop(
ar.insert(event_id);
drop(ar);

if let Err(e) = tokio::time::timeout(
match tokio::time::timeout(
Duration::from_secs(60),
handle_nwc_request(event, keys, config, &client, tracker, lnd),
)
.await
{
error!("Error: {e}");
Ok(Ok(_)) => {},
Ok(Err(e)) => error!("Error processing request: {e}"),
Err(e) => error!("Timeout error: {e}"),
}

// remove request from active requests
Expand Down

0 comments on commit 740341f

Please sign in to comment.