Skip to content

Commit

Permalink
legacyprovision: run old login cleanup in background
Browse files Browse the repository at this point in the history
  • Loading branch information
tulir committed Sep 30, 2024
1 parent 4d7c3d3 commit 2a67a72
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/mautrix-gmessages/legacyprovision.go
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ func legacyProvGoogleLoginWait(w http.ResponseWriter, r *http.Request) {
})
return
}
handleLoginComplete(r.Context(), user, nextStep.CompleteParams.UserLogin)
go handleLoginComplete(context.WithoutCancel(r.Context()), user, nextStep.CompleteParams.UserLogin)
jsonResponse(w, http.StatusOK, LoginResponse{Status: "success"})
}

Expand Down Expand Up @@ -489,7 +489,7 @@ func legacyProvQRLogin(w http.ResponseWriter, r *http.Request) {
jsonResponse(w, http.StatusOK, LoginResponse{Status: "qr", Code: nextStep.DisplayAndWaitParams.Data})
} else if nextStep.StepID == connector.LoginStepIDComplete {
logins.Delete(user.MXID)
handleLoginComplete(r.Context(), user, nextStep.CompleteParams.UserLogin)
go handleLoginComplete(context.WithoutCancel(r.Context()), user, nextStep.CompleteParams.UserLogin)
jsonResponse(w, http.StatusOK, LoginResponse{Status: "success"})
} else {
logins.Delete(user.MXID)
Expand Down

0 comments on commit 2a67a72

Please sign in to comment.