mirror of
https://github.com/neondatabase/neon.git
synced 2026-05-16 20:50:37 +00:00
fix up logged error for walreceiver connection failed
For some reason printing the Result made the error string print twice, along with some annoying newlines. Extracting the error first gets the expected result (just one explanation, no newlines)
This commit is contained in:
@@ -34,14 +34,15 @@ pub fn thread_main(conf: &PageServerConf, wal_producer_connstr: &str) {
|
||||
|
||||
runtime.block_on(async {
|
||||
loop {
|
||||
let _res = walreceiver_main(conf, wal_producer_connstr).await;
|
||||
let res = walreceiver_main(conf, wal_producer_connstr).await;
|
||||
|
||||
// TODO: print/log the error
|
||||
info!(
|
||||
"WAL streaming connection failed, retrying in 1 second...: {:?}",
|
||||
_res
|
||||
);
|
||||
sleep(Duration::from_secs(1)).await;
|
||||
if let Err(e) = res {
|
||||
info!(
|
||||
"WAL streaming connection failed ({}), retrying in 1 second",
|
||||
e
|
||||
);
|
||||
sleep(Duration::from_secs(1)).await;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user