From aa10a1ca87c93646544d6256ec0761cc2688b572 Mon Sep 17 00:00:00 2001 From: Paul Lecuq Date: Sun, 10 Jul 2022 18:49:49 +0200 Subject: [PATCH] updated ipblc with zmq error printing --- README.md | 10 +++++----- src/ipblc/mod.rs | 10 ++++++++-- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index c1c2cc6..1d15cba 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ OPTIONS: - ✅ Config centralization (Main config in ipbl) - ✅ Handles date in log -- ✅ fine grain file opening +- ✅ Fine grain file opening - ✅ Handle zeromq data transfer - ✅ Code optimizations (WIP) - ✅ Error handing when fetching config @@ -48,10 +48,10 @@ OPTIONS: ### Date formats ``` -nginx: 2022-02-09T10:05:02+01:00 -ssh: 2022-02-09T09:29:15.797469+01:00 -openvpn: 2022-02-09 09:58:59 -mail: 2022-02-09T09:59:31.228303+01:00 +nginx: 2006-01-02T15:04:05+01:00 +ssh: 2006-01-02T15:04:05.000000+01:00 +openvpn: 2006-01-02 15:04:05 +mail: 2006-01-02T15:04:05.000000+01:00 ``` ## License diff --git a/src/ipblc/mod.rs b/src/ipblc/mod.rs index e5883b5..84498d8 100644 --- a/src/ipblc/mod.rs +++ b/src/ipblc/mod.rs @@ -60,9 +60,15 @@ async fn listenpubsub(ctx: &Arc>, txpubsub: Sender, socke let msgs: Option = match socket.recv_string(0) { Ok(s) => match s { Ok(ss) => Some(ss), - Err(_) => None, + Err(e) => { + println!("{e:?}"); + None + } }, - Err(_) => None, + Err(e) => { + println!("{e:?}"); + None + } }; match msgs { Some(ss) => {