Do not store empty messages.
Some checks reported errors
continuous-integration/drone/push Build encountered an error

This commit is contained in:
Mark Nellemann 2023-03-03 10:37:08 +01:00
parent 31a5920465
commit a0d1aa4e54

View file

@ -69,8 +69,10 @@ public class HelloController {
@Consumes(MediaType.APPLICATION_FORM_URLENCODED) @Consumes(MediaType.APPLICATION_FORM_URLENCODED)
public HttpResponse<?> ping(String message) { public HttpResponse<?> ping(String message) {
log.info(message); log.info(message);
if(!message.isEmpty()) {
counter++; counter++;
msgDeque.push(message); msgDeque.push(message);
}
if(msgDeque.size() > 25) { if(msgDeque.size() > 25) {
log.debug("Message deque: {}", msgDeque.size()); log.debug("Message deque: {}", msgDeque.size());
msgDeque.removeLast(); msgDeque.removeLast();