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)
|
||||
public HttpResponse<?> ping(String message) {
|
||||
log.info(message);
|
||||
counter++;
|
||||
msgDeque.push(message);
|
||||
if(!message.isEmpty()) {
|
||||
counter++;
|
||||
msgDeque.push(message);
|
||||
}
|
||||
if(msgDeque.size() > 25) {
|
||||
log.debug("Message deque: {}", msgDeque.size());
|
||||
msgDeque.removeLast();
|
||||
|
|
Loading…
Reference in a new issue