release readable stream

issue #38
This commit is contained in:
Jing Hua 2023-03-07 23:04:37 +08:00
parent 21da7342eb
commit 9fedb3f169

View file

@ -89,6 +89,8 @@ const useSubmit = () => {
} else { } else {
reader.cancel('Generation completed'); reader.cancel('Generation completed');
} }
reader.releaseLock();
stream.cancel();
} }
} catch (e: unknown) { } catch (e: unknown) {
const err = (e as Error).message; const err = (e as Error).message;