Don't send CLOSED in response to CLOSE

This commit is contained in:
Mike Dilger 2025-01-21 10:48:50 +13:00
parent f6dbf63e64
commit fb80811f9f
No known key found for this signature in database
GPG Key ID: 47581A78D4329BA4

View File

@ -340,10 +340,16 @@ impl WebSocketService {
// If we have that subscription
if self.subscriptions.contains_key(subid) {
// Remove it, and let them know
// Remove it
self.subscriptions.remove(subid);
// Don't send a CLOSED because there is no valid prefix for this kind of
// message, and clients just presume it was closed.
/*
let reply = NostrReply::Closed(subid, NostrReplyPrefix::None, "".to_owned());
self.send(Message::text(reply.as_json())).await?;
*/
Ok(())
} else {
Err(ChorusError::NoSuchSubscription.into())