Do not store empty messages.
Some checks reported errors
continuous-integration/drone/push Build encountered an error
Some checks reported errors
continuous-integration/drone/push Build encountered an error
This commit is contained in:
parent
31a5920465
commit
a0d1aa4e54
|
@ -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();
|
||||||
|
|
Loading…
Reference in a new issue