send notices on a goroutine.

This commit is contained in:
fiatjaf 2023-02-05 20:03:00 -03:00
parent 7c1ab3e627
commit a0d9f3a392
No known key found for this signature in database
GPG Key ID: BAD43C4BE5C1A3A1

View File

@ -123,7 +123,9 @@ func (r *Relay) Connect(ctx context.Context) error {
case "NOTICE":
var content string
json.Unmarshal(jsonMessage[1], &content)
r.Notices <- content
go func() {
r.Notices <- content
}()
case "AUTH":
var challenge string
json.Unmarshal(jsonMessage[1], &challenge)