Skip to content

Commit

Permalink
Revert "Changing error class for retry logic"
Browse files Browse the repository at this point in the history
This reverts commit a256948.
  • Loading branch information
RichtXO committed Apr 4, 2024
1 parent a256948 commit 629fc77
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions src/main/java/com/richtxo/LilMo.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,8 @@
import discord4j.core.event.domain.interaction.ChatInputInteractionEvent;
import discord4j.core.object.presence.ClientActivity;
import discord4j.core.object.presence.ClientPresence;
import discord4j.rest.http.client.ClientException;
import discord4j.rest.request.RouteMatcher;
import discord4j.rest.response.ResponseFunction;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import reactor.retry.Retry;

public class LilMo {
public static final Logger LOGGER = LoggerFactory.getLogger(LilMo.class);
Expand All @@ -31,10 +27,10 @@ public class LilMo {

public static void main(String[] args){
final GatewayDiscordClient client = DiscordClientBuilder.create(System.getenv("TOKEN"))
.onClientResponse(
ResponseFunction.retryWhen(
RouteMatcher.any(),
Retry.anyOf(ClientException.class)))
// .onClientResponse(
// ResponseFunction.retryWhen(
// RouteMatcher.any(),
// Retry.anyOf(SslHandler.class)))
.build()
.gateway()
.setInitialPresence(s -> ClientPresence.online(
Expand Down

0 comments on commit 629fc77

Please sign in to comment.