mirror of
https://github.com/mikedilger/chorus.git
synced 2026-08-31 07:31:01 +00:00
Log new subscriptions with more information about total subscriptions
This commit is contained in:
parent
9d65d773b8
commit
11c1136360
@ -60,8 +60,6 @@ impl WebSocketService {
|
||||
outpos += outlen;
|
||||
verify_char(input, b'"', &mut inpos)?; // FIXME: json_unescape should eat the closing quote
|
||||
|
||||
log::info!("SUBID={}", subid);
|
||||
|
||||
let max_subscriptions = GLOBALS.config.read().await.max_subscriptions;
|
||||
if self.subscriptions.len() >= max_subscriptions {
|
||||
let reply = NostrReply::Closed(
|
||||
@ -138,6 +136,9 @@ impl WebSocketService {
|
||||
self.websocket.send(Message::text(reply.as_json())).await?;
|
||||
}
|
||||
|
||||
let num_subs = self.subscriptions.len() + 1; // since we are about to add 1
|
||||
log::info!("new subscription \"{subid}\", {num_subs} total");
|
||||
|
||||
// Store subscription
|
||||
self.subscriptions.insert(subid, filters);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user