Skip to content

Commit

Permalink
fix oauth SSO panic on close
Browse files Browse the repository at this point in the history
  • Loading branch information
abhishek9686 committed Apr 30, 2024
1 parent c5a5f9b commit 3db596e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion functions/register_sso.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,11 @@ func handeServerSSORegisterConn(reqMsg *models.RegisterMsg, apiURI string, conn
return err
}
done := make(chan struct{})
defer close(done)
interrupt := make(chan os.Signal, 1)
signal.Notify(interrupt, os.Interrupt)

go func() {
defer close(done)
for {
msgType, msg, err := conn.ReadMessage()
if err != nil {
Expand Down Expand Up @@ -123,6 +123,7 @@ func handeServerSSORegisterConn(reqMsg *models.RegisterMsg, apiURI string, conn
}
handleRegisterResponse(&response)
}

}
}()

Expand Down

0 comments on commit 3db596e

Please sign in to comment.