You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 5, 2022. It is now read-only.
Hello: node-scp2 is a good tool to upload or download file from remote. When I use client.scp method in node-webkit, I meet a problem: first time the code run perfectly, but when I click the upload button to run this code again, it throw an exception. It refuse me. After I look over the scp2 source code, I found this in scp.jsfile:
async.eachSeries(files, function(fpath, done) {
fs.stat(fpath, function(err, stats) {
if (err) {
done(err);
return;
}
if (stats.isFile()) {
var fname = path.relative(rootdir, fpath);
client.upload(
fpath, path.join(client.remote.path, fname), done
);
} else {
done();
}
});
}, function(err) {
// never forget to close the session close by myself
client.on('close', function() {
callback(err);
});
client.close();
});
This problem is because that after client.scp method, it close the connection automatically, so next time when I run this method, the code throw an error!
I suggest that whether client.scp method can add a parameter like autoclose: false?? so user can choose whether the connection should be closed or not.
Thanks!!
The text was updated successfully, but these errors were encountered:
I'm facing the same issue. Retries work if I comment out the client.close(), but I think the connection over time will eventually drop. If I let it close completely, and retry I get:
path.js:299
return splitPathRe.exec(filename).slice(1);
^
RangeError: Maximum call stack size exceeded
Anyone figured out how to do a retry successfully?
Hello:
node-scp2
is a good tool to upload or download file from remote. When I useclient.scp
method innode-webkit
, I meet a problem: first time the code run perfectly, but when I click the upload button to run this code again, it throw an exception. It refuse me. After I look over the scp2 source code, I found this inscp.js
file:This problem is because that after
client.scp
method, it close the connection automatically, so next time when I run this method, the code throw an error!I suggest that whether
client.scp
method can add a parameter like autoclose: false?? so user can choose whether the connection should be closed or not.Thanks!!
The text was updated successfully, but these errors were encountered: