commit 1b10436d222864210bd6ac952c0f107ba79c8905
parent 4d23117fdb61298399bb02de21db2abe684f57e5
Author: Antoine A <>
Date: Thu, 10 Mar 2022 00:19:59 +0100
Watcher throttle on error
Diffstat:
5 files changed, 9 insertions(+), 12 deletions(-)
diff --git a/README.md b/README.md
@@ -85,9 +85,9 @@ the RPC server. Two flags are mandatory:
- `maxtxfee=?`: bitcoin transactions fees can exceed taler wire fees, putting
your wire in bankruptcy. You must specify an acceptable transaction fee cap.
-It is also recommanded to disable RPC client timeout with `rpcclienttimeout=0`
+It is also recommanded to disable RPC client timeout with `rpcservertimeout=0`
or to set a timeout delay superior than the block delay (e.g
-`rpcclienttimeout=720`) to prevent recurrent "Broken pipe" errors.
+`rpcservertimeout=720`) to prevent recurrent "Broken pipe" errors.
```ini
[depolymerizer-bitcoin]
diff --git a/btc-wire/src/btc_config.rs b/btc-wire/src/btc_config.rs
@@ -22,7 +22,7 @@ use std::{
use bitcoin::Network;
use common::{
currency::CurrencyBtc,
- log::{fail, log::info, OrFail},
+ log::{fail, OrFail},
};
use crate::{
diff --git a/btc-wire/src/loops/watcher.rs b/btc-wire/src/loops/watcher.rs
@@ -1,3 +1,5 @@
+use std::time::Duration;
+
/*
This file is part of TALER
Copyright (C) 2022 Taler Systems SA
@@ -29,6 +31,7 @@ pub fn watcher(mut rpc: AutoRpcCommon, mut db: AutoReconnectDb) {
})();
if let Err(e) = result {
error!("watcher: {}", e);
+ std::thread::sleep(Duration::from_secs(5));
}
}
}
diff --git a/eth-wire/src/loops/watcher.rs b/eth-wire/src/loops/watcher.rs
@@ -1,3 +1,5 @@
+use std::time::Duration;
+
/*
This file is part of TALER
Copyright (C) 2022 Taler Systems SA
@@ -33,6 +35,7 @@ pub fn watcher(mut rpc: AutoRpcCommon, mut db: AutoReconnectDb) {
})();
if let Err(e) = result {
error!("watcher: {}", e);
+ std::thread::sleep(Duration::from_secs(5));
}
}
}
diff --git a/nginx.conf b/nginx.conf
@@ -1,8 +0,0 @@
-events {}
-http {
- server {
- location /btc-wire {
- proxy_pass http://unix:/home/god/btc-wire.sock;
- }
- }
-}
-\ No newline at end of file