mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-18 00:47:01 +00:00
fix(operation) setListeners: leak on copy, pack, delete
This commit is contained in:
parent
704d33d956
commit
8cabdb80ee
1 changed files with 3 additions and 6 deletions
|
|
@ -85,8 +85,8 @@
|
|||
|
||||
copier.on('connect', function() {
|
||||
authCheck(copier, function() {
|
||||
setListeners(copier, callback);
|
||||
copyFn = function(data, callback) {
|
||||
setListeners(copier, callback);
|
||||
copier.copy(data.from, data.to, data.names);
|
||||
};
|
||||
});
|
||||
|
|
@ -103,10 +103,9 @@
|
|||
fn();
|
||||
remover.on('connect', function() {
|
||||
authCheck(remover, function() {
|
||||
setListeners(remover, callback);
|
||||
deleteFn = function(from, files, callback) {
|
||||
from = from.replace(/\?.*/, '');
|
||||
|
||||
setListeners(remover, callback);
|
||||
remover.remove(from, files);
|
||||
};
|
||||
});
|
||||
|
|
@ -123,14 +122,12 @@
|
|||
fn();
|
||||
packer.on('connect', function() {
|
||||
authCheck(packer, function() {
|
||||
setListeners(packer, callback);
|
||||
packFn = function(data, callback) {
|
||||
setListeners(packer, callback);
|
||||
|
||||
packer.pack(data.from, data.to, data.names);
|
||||
};
|
||||
|
||||
extractFn = function(data, callback) {
|
||||
setListeners(packer, callback);
|
||||
packer.extract(data.from, data.to);
|
||||
};
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue