wait when CLOSEing.

This commit is contained in:
fiatjaf
2023-06-25 12:56:17 -03:00
parent 3b44ab9381
commit 71f4594033

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)
}
}