Skip to content

Commit 6c96ef7

Browse files
committed
修正 Semaphore
1 parent 147e33a commit 6c96ef7

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/pkg/utils/concurrency-control.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,13 @@ export const withTimeoutNotify = <T>(
4444
clearTimeout(cid);
4545
res.result = result;
4646
res.settled = true;
47-
fn(res);
48-
return res;
4947
})
5048
.catch((e) => {
5149
clearTimeout(cid);
5250
res.err = e;
5351
res.settled = true;
52+
})
53+
.then(() => {
5454
fn(res);
5555
return res;
5656
});

0 commit comments

Comments
 (0)