diff --git a/server.js b/server.js index df88a6b..6ff8643 100644 --- a/server.js +++ b/server.js @@ -18,7 +18,7 @@ app.use(ctx => { }) const PORT = 23333 -app.listen(PORT, '127.0.0.1', console.log('http://127.0.0.1:' + PORT)) +app.listen(PORT, '0.0.0.0', console.log('http://127.0.0.1:' + PORT)) async function catcher (ctx, next) { try { diff --git a/src/gd.js b/src/gd.js index 786ec5c..7434b1a 100644 --- a/src/gd.js +++ b/src/gd.js @@ -557,6 +557,7 @@ async function create_folders ({ source, old_mapping, folders, root, task_id, se })) folders = folders.filter(v => !mapping[v.id]) same_levels = [].concat(...same_levels.map(v => folders.filter(vv => vv.parent === v.id))) + if (!limit.activeCount && !limit.pendingCount) break } clearInterval(loop)