Ability to remove handlers from worker-channel and metadata-manager

This commit is contained in:
yflory
2019-08-16 11:09:24 +02:00
parent ba24cde76d
commit 656b129543
3 changed files with 22 additions and 6 deletions

View File

@@ -92,12 +92,11 @@ define([
var opts = {
password: pData.password
};
var done = false;
ctx.sframeChan.on("EV_CRYPTGET_PROGRESS", function (data) {
if (done || data.hash !== parsed.hash) { return; }
var handler = ctx.sframeChan.on("EV_CRYPTGET_PROGRESS", function (data) {
if (data.hash !== parsed.hash) { return; }
updateProgress.progress(data.progress);
if (data.progress === 1) {
done = true;
handler.stop();
updateProgress.progress2(1);
}
});