Skip to content

Commit

Permalink
use forked messenger
Browse files Browse the repository at this point in the history
  • Loading branch information
jpenilla committed Sep 12, 2023
1 parent df1be68 commit 78c34da
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 401 deletions.
1 change: 0 additions & 1 deletion common/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ dependencies {
api(libs.messengerNats)
api(libs.messengerRabbitmq)
api(libs.messengerRedis)
compileOnly(libs.jedis)
compileOnlyApi(libs.netty)

api(libs.event)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,14 +126,14 @@ protected void init() {
// Load channels
this.channelRegistry().loadConfigChannels(this.carbonMessages);

this.messagingManager.get();

CompletableFuture.runAsync(() -> {
if (!this.injector.getInstance(ConfigManager.class).primaryConfig().updateChecker()) {
return;
}
new UpdateChecker(this.logger).checkVersion();
});

this.messagingManager.get();
}

protected void shutdown() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
import ninja.egg82.messenger.NATSMessagingService;
import ninja.egg82.messenger.PacketManager;
import ninja.egg82.messenger.RabbitMQMessagingService;
import ninja.egg82.messenger.RedisMessagingService;
import ninja.egg82.messenger.handler.AbstractServerMessagingHandler;
import ninja.egg82.messenger.handler.MessagingHandler;
import ninja.egg82.messenger.handler.MessagingHandlerImpl;
Expand Down Expand Up @@ -124,13 +125,7 @@ public MessagingManager(
PacketManager.register(LocalPlayerChangePacket.class, LocalPlayerChangePacket::new);
PacketManager.register(WhisperPacket.class, WhisperPacket::new);

this.packetService = new PacketService(4, false, protocolVersion) {
// todo super is broken - calls remove on COWIterator
@Override
public boolean removeMessenger(final @NonNull String serviceName) {
return true;
}
};
this.packetService = new PacketService(4, false, protocolVersion);
this.scheduledExecutor = new ExceptionLoggingScheduledThreadPoolExecutor(4,
ConcurrentUtil.carbonThreadFactory(logger, "MessagingManager"), logger);

Expand Down
Loading

0 comments on commit 78c34da

Please sign in to comment.