Browse Source
When SMTP is enabled, a new-device login awaited the notification email before returning the HTTP response, so a slow SMTP server could exceed the clients' ~10s timeout and turn a successful login into an error. Send the email in the background (tokio::task::spawn) when require_device_email is disabled (the default), where it is best-effort; keep the awaited and failing path when it is enabled. send_new_device_logged_in now takes the device name and type by value so the spawned task can own its data (Device isn't Clone). Fixes #5856pull/7381/head
2 changed files with 47 additions and 29 deletions
Loading…
Reference in new issue