Avoid stack overflow - don't log a message within the log handler (#4556)
* Avoid stack overflow - don't log a message within the log handler Signed-off-by: Chris Jackson <chris@cd-jackson.com> * Don't log error Signed-off-by: Chris Jackson <chris@cd-jackson.com> --------- Signed-off-by: Chris Jackson <chris@cd-jackson.com>pull/4463/merge
parent
9ad83bada4
commit
1b203d1b79
|
@ -113,7 +113,6 @@ public class LogWebSocket implements LogListener {
|
|||
private synchronized void sendMessage(String message) throws IOException {
|
||||
RemoteEndpoint remoteEndpoint = this.remoteEndpoint;
|
||||
if (remoteEndpoint == null) {
|
||||
logger.warn("Could not determine remote endpoint, failed to send '{}'.", message);
|
||||
return;
|
||||
}
|
||||
remoteEndpoint.sendString(message);
|
||||
|
@ -128,7 +127,7 @@ public class LogWebSocket implements LogListener {
|
|||
LogDTO logDTO = map(logEntry);
|
||||
sendMessage(gson.toJson(logDTO));
|
||||
} catch (IOException e) {
|
||||
logger.debug("Failed to send log {} to {}: {}", logEntry, remoteIdentifier, e.getMessage());
|
||||
// Fail silently!
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue