debug log CLOSE messages.

This commit is contained in:
fiatjaf 2023-04-12 12:14:16 -03:00
parent 2314db57a1
commit ec3f1287c4
No known key found for this signature in database
GPG Key ID: BAD43C4BE5C1A3A1

View File

@ -46,7 +46,10 @@ func (sub *Subscription) Unsub() {
sub.mutex.Lock()
defer sub.mutex.Unlock()
sub.conn.WriteJSON([]interface{}{"CLOSE", sub.GetID()})
message := []any{"CLOSE", sub.GetID()}
debugLog("{%s} sending %v", sub.Relay.URL, message)
sub.conn.WriteJSON(message)
if sub.stopped == false && sub.Events != nil {
close(sub.Events)
}