diff --git a/cmd/signald-cli/cmd/register.go b/cmd/signald-cli/cmd/register.go index af2f8c5..eebf8a0 100644 --- a/cmd/signald-cli/cmd/register.go +++ b/cmd/signald-cli/cmd/register.go @@ -42,6 +42,7 @@ var registerCmd = &cobra.Command{ go s.Listen(nil) r := <-s.GetResponseListener(requestID) + defer s.CloseResponseListener(requestID) account, err := r.Data.MarshalJSON() if err != nil { log.Fatal("error rendering response:", err) diff --git a/cmd/signald-cli/cmd/verify.go b/cmd/signald-cli/cmd/verify.go index 984fbc1..baadb71 100644 --- a/cmd/signald-cli/cmd/verify.go +++ b/cmd/signald-cli/cmd/verify.go @@ -47,6 +47,7 @@ var verify = &cobra.Command{ go s.Listen(nil) r := <-s.GetResponseListener(requestID) + defer s.CloseResponseListener(requestID) account, err := r.Data.MarshalJSON() if err != nil { log.Fatal("error rendering response:", err)