Close response listeners
This commit is contained in:
parent
0f7100527b
commit
e8e52b82a1
2 changed files with 2 additions and 0 deletions
|
@ -42,6 +42,7 @@ var registerCmd = &cobra.Command{
|
||||||
go s.Listen(nil)
|
go s.Listen(nil)
|
||||||
|
|
||||||
r := <-s.GetResponseListener(requestID)
|
r := <-s.GetResponseListener(requestID)
|
||||||
|
defer s.CloseResponseListener(requestID)
|
||||||
account, err := r.Data.MarshalJSON()
|
account, err := r.Data.MarshalJSON()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal("error rendering response:", err)
|
log.Fatal("error rendering response:", err)
|
||||||
|
|
|
@ -47,6 +47,7 @@ var verify = &cobra.Command{
|
||||||
go s.Listen(nil)
|
go s.Listen(nil)
|
||||||
|
|
||||||
r := <-s.GetResponseListener(requestID)
|
r := <-s.GetResponseListener(requestID)
|
||||||
|
defer s.CloseResponseListener(requestID)
|
||||||
account, err := r.Data.MarshalJSON()
|
account, err := r.Data.MarshalJSON()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal("error rendering response:", err)
|
log.Fatal("error rendering response:", err)
|
||||||
|
|
Loading…
Reference in a new issue