Compare commits

...

2 commits

Author SHA1 Message Date
a486daa81c discord-rest: Fix status code expectation
A successful send will produce a 200 code.
2024-11-28 23:14:47 +01:00
3aa27ef8ff bot: Fix double thread start
Double start will produce following exception:
> java.lang.IllegalThreadStateException: Already started
2024-11-28 23:13:27 +01:00
2 changed files with 2 additions and 2 deletions

View file

@ -43,6 +43,6 @@ public final class MessageService {
} }
}; };
logger.debug("Handling message in new process: {}", originalMessageId); logger.debug("Handling message in new process: {}", originalMessageId);
Thread.startVirtualThread(callable).start(); Thread.startVirtualThread(callable);
} }
} }

View file

@ -34,7 +34,7 @@ public final class DiscordRest {
.build(); .build();
final HttpResponse<Void> response = httpClient.send(request, HttpResponse.BodyHandlers.discarding()); final HttpResponse<Void> response = httpClient.send(request, HttpResponse.BodyHandlers.discarding());
if (response.statusCode() != 201) { if (response.statusCode() != 200) {
logger.error("Unexpected status code: {}", response.statusCode()); logger.error("Unexpected status code: {}", response.statusCode());
} }
} }