close relay websockets cleanly.

This commit is contained in:
fiatjaf
2024-01-11 21:29:39 -03:00
parent 637b9440ef
commit a30f422d7d
3 changed files with 21 additions and 1 deletions

6
req.go
View File

@@ -135,6 +135,12 @@ example:
for i, relay := range relays {
relayUrls[i] = relay.URL
}
defer func() {
for _, relay := range relays {
relay.Close()
}
}()
}
for stdinFilter := range getStdinLinesOrBlank() {