mirror of
https://github.com/darksaid98/Carbon.git
synced 2026-12-03 22:15:45 +00:00
Remove HeartbeatPacket
This commit is contained in:
1 parent
307be2e6bd
commit
caefe2791a
1 file changed
+1
-7
@@ -77,7 +77,7 @@ public class MessagingManager {
|
|||||||
PacketManager.register(PacketVersionPacket.class, PacketVersionPacket::new);
|
PacketManager.register(PacketVersionPacket.class, PacketVersionPacket::new);
|
||||||
PacketManager.register(PacketVersionRequestPacket.class, PacketVersionRequestPacket::new);
|
PacketManager.register(PacketVersionRequestPacket.class, PacketVersionRequestPacket::new);
|
||||||
PacketManager.register(ShutdownPacket.class, ShutdownPacket::new);
|
PacketManager.register(ShutdownPacket.class, ShutdownPacket::new);
|
||||||
PacketManager.register(HeartbeatPacket.class, HeartbeatPacket::new);
|
//PacketManager.register(HeartbeatPacket.class, HeartbeatPacket::new);
|
||||||
PacketManager.register(ChatMessagePacket.class, ChatMessagePacket::new);
|
PacketManager.register(ChatMessagePacket.class, ChatMessagePacket::new);
|
||||||
|
|
||||||
this.packetService = new PacketService(4, false, protocolVersion);
|
this.packetService = new PacketService(4, false, protocolVersion);
|
||||||
@@ -104,12 +104,6 @@ public class MessagingManager {
|
|||||||
this.executorService.scheduleAtFixedRate(() -> {
|
this.executorService.scheduleAtFixedRate(() -> {
|
||||||
this.packetService.queuePacket(new KeepAlivePacket(carbonChat.serverId()));
|
this.packetService.queuePacket(new KeepAlivePacket(carbonChat.serverId()));
|
||||||
this.packetService.flushQueue();
|
this.packetService.flushQueue();
|
||||||
}, 5, 10, TimeUnit.SECONDS);
|
|
||||||
|
|
||||||
// Broadcast heartbeat packets
|
|
||||||
this.executorService.scheduleAtFixedRate(() -> {
|
|
||||||
this.packetService.queuePacket(new HeartbeatPacket(carbonChat.serverId(), protocolVersion));
|
|
||||||
this.packetService.flushQueue();
|
|
||||||
}, 5, 5, TimeUnit.SECONDS);
|
}, 5, 5, TimeUnit.SECONDS);
|
||||||
|
|
||||||
this.executorService.scheduleAtFixedRate(() -> {
|
this.executorService.scheduleAtFixedRate(() -> {
|
||||||
|
|||||||
Reference in new issue
Block a user