Skip to content

Commit

Permalink
Update to latest dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
quanticc committed Jul 7, 2020
1 parent 7de2644 commit c034b9b
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 14 deletions.
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ ext {
jdk_javadoc = "https://docs.oracle.com/en/java/javase/$jdk/docs/api/".toString()
}

discord4j_core_version = '3.1.0-SNAPSHOT'
stores_redis_version = '3.1.1'
discord4j_core_version = '3.1.0.RC3'
stores_redis_version = '3.1.2'
rsocket_version = '1.0.1'
rabbitmq_version = '1.4.2.RELEASE'
rabbitmq_version = '1.4.3.RELEASE'
jsr305_version = '3.0.2'
junit_version = '4.13'
logback_version = '1.2.3'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@

package discord4j.connect.common;

import discord4j.common.close.CloseStatus;
import discord4j.common.close.DisconnectBehavior;
import discord4j.discordjson.json.gateway.Dispatch;
import discord4j.discordjson.json.gateway.Opcode;
import discord4j.gateway.GatewayClient;
Expand Down Expand Up @@ -222,7 +224,8 @@ public Duration getResponseTime() {
@Override
public Mono<Void> close(boolean allowResume) {
return Mono.fromRunnable(() -> {
dispatchSink.next(GatewayStateChange.disconnected());
dispatchSink.next(GatewayStateChange.disconnected(DisconnectBehavior.stop(null),
allowResume ? CloseStatus.ABNORMAL_CLOSE : CloseStatus.NORMAL_CLOSE));
senderSink.complete();
closeFuture.onComplete();
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@
import discord4j.core.object.presence.Presence;
import discord4j.core.shard.InvalidationStrategy;
import discord4j.core.shard.ShardingStrategy;
import discord4j.gateway.intent.Intent;
import discord4j.gateway.intent.IntentSet;
import discord4j.store.api.noop.NoOpStoreService;
import reactor.core.publisher.Mono;
import reactor.rabbitmq.QueueSpecification;
Expand Down Expand Up @@ -112,10 +110,10 @@ public static void main(String[] args) {
.setSharding(shardingStrategy)
// Properly coordinate IDENTIFY attempts across all shards
.setShardCoordinator(RSocketShardCoordinator.createWithServerAddress(coordinatorServerAddress))
.setDisabledIntents(IntentSet.of(
Intent.GUILD_PRESENCES,
Intent.GUILD_MESSAGE_TYPING,
Intent.DIRECT_MESSAGE_TYPING))
// .setDisabledIntents(IntentSet.of(
// Intent.GUILD_PRESENCES,
// Intent.GUILD_MESSAGE_TYPING,
// Intent.DIRECT_MESSAGE_TYPING))
.setInitialStatus(s -> Presence.invisible())
// Disable invalidation strategy, event publishing and entity cache to save memory usage
.setDispatchEventMapper(DispatchEventMapper.discardEvents())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@

package discord4j.connect.rsocket.shared.servers;

import discord4j.connect.rsocket.global.RSocketGlobalRouterServer;
import discord4j.connect.Constants;
import discord4j.connect.rsocket.global.RSocketGlobalRouterServer;
import discord4j.rest.request.BucketGlobalRateLimiter;
import discord4j.rest.request.RequestQueueFactory;
import io.rsocket.transport.netty.server.CloseableChannel;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import reactor.core.scheduler.Schedulers;
import reactor.util.Logger;
import reactor.util.Loggers;

import java.net.InetSocketAddress;
import java.time.Duration;
Expand All @@ -35,7 +35,7 @@
*/
public class ExampleRSocketGlobalRouterServer {

private static final Logger log = LoggerFactory.getLogger(ExampleRSocketGlobalRouterServer.class);
private static final Logger log = Loggers.getLogger(ExampleRSocketGlobalRouterServer.class);

public static void main(String[] args) {
// this server combines a Router and a GlobalRateLimiter servers
Expand Down
2 changes: 2 additions & 0 deletions examples/src/main/resources/logback.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
<logger name="reactor.retry" level="INFO"/>
<logger name="io.lettuce" level="INFO"/>
<logger name="io.rsocket" level="INFO"/>
<logger name="discord4j.limiter" level="TRACE"/>
<logger name="discord4j.connect.rsocket.shared.servers" level="TRACE"/>
<logger name="discord4j.connect.rsocket.gateway.RSocketPayloadServer" level="DEBUG"/>
<logger name="discord4j.connect.common.DownstreamGatewayClient" level="INFO"/>
<!-- <logger name="discord4j.gateway.protocol.sender" level="TRACE"/>-->
Expand Down

0 comments on commit c034b9b

Please sign in to comment.