Skip to content
This repository has been archived by the owner on May 16, 2024. It is now read-only.

[MV-393] Fix connecting the second time after error #79

Merged
merged 1 commit into from
Apr 4, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -287,8 +287,13 @@ export function useMembraneServer() {
async (...args: any) => {
if (lock.current) return Promise.resolve();
lock.current = true;
await f(...args);
lock.current = false;
try {
await f(...args);
} catch (e) {
throw e;
} finally {
lock.current = false;
}
};

/**
Expand Down