fix: add missing awaits when changing client certificate#20189
Merged
alextran1502 merged 1 commit intoimmich-app:mainfrom Jul 25, 2025
Merged
Conversation
Member
|
@jfly Can you fix the failing lint? Thanks |
e31e16b to
ec9871f
Compare
I ran into this while testing out <immich-app#19830>. When I add, change, or remove a client certificate under Immich's advanced settings, the change wouldn't take effect until some mysterious point in the future. For example: 1. Add a client certificate. It doesn't get used. 2. Remove certificate. *Now* the client certificate from step 1) is used. 3. Restart application. Now no client certificate is used. This all boils down to some missing `await`s. The user would change the cert, and we'd start asynchronously saving it to the store, and while the save is still happening, [`HttpSSLOptions` pulls the "old" value out of `SSLClientCertStoreVal`](https://github.com/immich-app/immich/blob/v1.136.0/mobile/lib/utils/http_ssl_options.dart#L30). With the appropriate `await`s, this behaves much more sanely.
ec9871f to
7cf8342
Compare
alextran1502
approved these changes
Jul 25, 2025
ollioddi
pushed a commit
to ollioddi/immich
that referenced
this pull request
Aug 11, 2025
…p#20189) I ran into this while testing out <immich-app#19830>. When I add, change, or remove a client certificate under Immich's advanced settings, the change wouldn't take effect until some mysterious point in the future. For example: 1. Add a client certificate. It doesn't get used. 2. Remove certificate. *Now* the client certificate from step 1) is used. 3. Restart application. Now no client certificate is used. This all boils down to some missing `await`s. The user would change the cert, and we'd start asynchronously saving it to the store, and while the save is still happening, [`HttpSSLOptions` pulls the "old" value out of `SSLClientCertStoreVal`](https://github.com/immich-app/immich/blob/v1.136.0/mobile/lib/utils/http_ssl_options.dart#L30). With the appropriate `await`s, this behaves much more sanely.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I ran into this while testing out
#19830. When I add, change, or remove a client certificate under Immich's advanced settings, the change wouldn't take effect until some mysterious point in the future. For example:
This all boils down to some missing
awaits. The user would change the cert, and we'd start asynchronously saving it to the store, and while the save is still happening,HttpSSLOptionspulls the "old" value out ofSSLClientCertStoreVal.With the appropriate
awaits, this behaves much more sanely.