Skip to content

Commit 16f4e2e

Browse files
committed
Add comments
Tool: gitpod/catfood.gitpod.cloud
1 parent b45b492 commit 16f4e2e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

components/server/src/authorization/spicedb.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,11 +105,14 @@ export class SpiceDBClientProvider {
105105
clientOptions: new TrustedValue(clientOptions),
106106
});
107107

108+
// close client after 10s to make sure most pending requests on the previous client are finished.
108109
setTimeout(() => {
109110
this.closeClient(oldClient);
110111
}, 10 * 1000);
111112
}
112113
this.clientOptions = clientOptions;
114+
// `createClient` will use the `DefaultClientOptions` to create client if the value on Feature Flag is not able to create a client
115+
// but we will still write `previousClientOptionsString` here to avoid retry with that incorrect value again
113116
this.previousClientOptionsString = customClientOptions;
114117
} catch (e) {
115118
log.error("[spicedb] Failed to parse custom client options", e);

0 commit comments

Comments
 (0)