Remove api.End() as it doesn't stop api.Recognize(), fix #387

master
jeromewu 5 years ago
parent 548a5a5142
commit 781f2f80ba
  1. 2
      src/createWorker.js

@ -109,10 +109,12 @@ module.exports = (_options = {}) => {
const terminate = async (jobId) => { const terminate = async (jobId) => {
if (worker !== null) { if (worker !== null) {
/*
await startJob(createJob({ await startJob(createJob({
id: jobId, id: jobId,
action: 'terminate', action: 'terminate',
})); }));
*/
terminateWorker(worker); terminateWorker(worker);
worker = null; worker = null;
} }

Loading…
Cancel
Save