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

View File

@@ -108,6 +108,12 @@ example:
}
}
defer func() {
for _, relay := range relays {
relay.Close()
}
}()
// gather the secret key
sec, err := gatherSecretKeyFromArguments(c)
if err != nil {