wait when CLOSEing.

This commit is contained in:
fiatjaf 2023-06-25 12:56:17 -03:00
parent 3b44ab9381
commit 71f4594033
No known key found for this signature in database
GPG Key ID: BAD43C4BE5C1A3A1

View File

@ -108,7 +108,7 @@ func (sub *Subscription) Close() {
closeMsg := CloseEnvelope(id)
closeb, _ := (&closeMsg).MarshalJSON()
debugLog("{%s} sending %v", sub.Relay.URL, closeb)
sub.Relay.Write(closeb)
<-sub.Relay.Write(closeb)
}
}