Procházet zdrojové kódy

possible fix for too many races

hmt před 3 roky
rodič
revize
c6abdce969
1 změnil soubory, kde provedl 2 přidání a 2 odebrání
  1. 2 2
      app.ts

+ 2 - 2
app.ts

@@ -15,9 +15,9 @@ router.all('/create', async (req, res, next) => {
   const existing_id = queue[meeting_id]
   if (existing_id) {
     console.log(`Race pending for meeting-ID: ${Color.red(meeting_id)}`)
-  } else {
-    queue[meeting_id] = deferred<string>();
+    await existing_id
   }
+  queue[meeting_id] = deferred<string>();
   next()
 })
 // the api itself answering to every call