Fix concurrency workspace creation (#5742)

Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
Denis Bykhov 2024-06-06 13:44:59 +05:00 committed by GitHub
parent e673345a4b
commit e67e554839
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -93,6 +93,7 @@ export async function connect (title: string): Promise<Client | undefined> {
let loginInfo = await ctx.with('select-workspace', {}, async () => (await fetchWorkspace(ws))[1])
if (loginInfo?.creating === true) {
while (true) {
if (ws !== getCurrentLocation().path[1]) return
workspaceCreating.set(loginInfo?.createProgress ?? 0)
loginInfo = await ctx.with('select-workspace', {}, async () => (await fetchWorkspace(ws))[1])
workspaceCreating.set(loginInfo?.createProgress)