nostr-rs-relay

My dev fork of nostr-rs-relay
git clone git://jb55.com/nostr-rs-relay
Log | Files | Refs | README | LICENSE

commit 6910b8d945f8c811f48b169cc7f0877111add11b
parent 531f6c4624a2e4b380d3a24d0e17763ba8ec8878
Author: Greg Heartsfield <scsibug@imap.cc>
Date:   Sun, 12 Dec 2021 10:58:00 -0600

feat: add log for unique client connection count

Diffstat:
Msrc/main.rs | 4++++
1 file changed, 4 insertions(+), 0 deletions(-)

diff --git a/src/main.rs b/src/main.rs @@ -58,6 +58,8 @@ fn main() -> Result<(), Error> { info!("shutting down due to SIGINT"); ctrl_c_shutdown.send(()).ok(); }); + // track unique client connection count + let mut client_accept_count: usize = 0; let mut stop_listening = invoke_shutdown.subscribe(); // handle new client connection requests, or SIGINT signals. loop { @@ -66,6 +68,8 @@ fn main() -> Result<(), Error> { break; } Ok((stream, _)) = listener.accept() => { + client_accept_count += 1; + info!("creating new connection for client #{}",client_accept_count); tokio::spawn(nostr_server( stream, bcast_tx.clone(),