Skip to content

Commit

Permalink
up 修复群组服问题
Browse files Browse the repository at this point in the history
  • Loading branch information
Coloryr committed Aug 16, 2024
1 parent c76b9d1 commit 182815c
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 10 deletions.
2 changes: 1 addition & 1 deletion core/AllMusic.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public class AllMusic {
/**
* 插件版本号
*/
public static final String version = "3.2.1";
public static final String version = "3.2.2";
/**
* 配置文件版本号
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -514,15 +514,13 @@ public void updateLyric() {

@Override
public void ping() {
Iterator<Server> iterator = TopServers.iterator();
while (iterator.hasNext()) {
Server server = iterator.next();
for (Server server : new HashSet<>(TopServers)) {
if (server.isConnected()) {
ByteArrayDataOutput out = ByteStreams.newDataOutput();
out.writeInt(200);
server.sendData(AllMusic.channelBC, out.toByteArray());
} else {
iterator.remove();
TopServers.remove(server);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -499,15 +499,13 @@ public void runTask(Runnable run, int delay) {

@Override
public void ping() {
Iterator<ServerConnection> iterator = TopServers.iterator();
while (iterator.hasNext()) {
ServerConnection server = iterator.next();
for (ServerConnection server : new HashSet<>(TopServers)) {
try {
ByteArrayDataOutput out = ByteStreams.newDataOutput();
out.writeInt(200);
server.sendPluginMessage(AllMusicVelocity.channelBC, out.toByteArray());
} catch (Exception e) {
iterator.remove();
TopServers.remove(server);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.2.1
3.2.2

0 comments on commit 182815c

Please sign in to comment.