Skip to content

Commit

Permalink
fix: 提示应该在上线成功前发出去
Browse files Browse the repository at this point in the history
  • Loading branch information
SALTWOOD committed Jan 12, 2025
1 parent e6671b5 commit 6b64f00
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -636,14 +636,14 @@ export class Server {
this.db.update(cluster);
return true;
}
socket.send(tip);

const randomFileCount = 5;
const randomFiles = Utilities.getRandomElements(this.fileList.getAvailableFiles(cluster), randomFileCount);

const message = await Utilities.checkSpecfiedFiles(randomFiles, cluster);
if (message) throw new Error(message);
else {
socket.send(tip);
cluster.doOnline(this.fileList.getAvailableFiles(cluster), socket);
this.db.update(cluster);
cluster.enableHistory = [];
Expand Down

0 comments on commit 6b64f00

Please sign in to comment.