Add `ClosedChannelException` to expected errors
This commit is contained in:
parent
43f83076fa
commit
a6d11789e9
|
@ -367,12 +367,13 @@ public class WebSocketConnection implements MessageAvailabilityListener, Displac
|
||||||
.orTimeout(sendFuturesTimeoutMillis, TimeUnit.MILLISECONDS))
|
.orTimeout(sendFuturesTimeoutMillis, TimeUnit.MILLISECONDS))
|
||||||
.doOnError(e -> {
|
.doOnError(e -> {
|
||||||
final String errorType;
|
final String errorType;
|
||||||
if (!(e instanceof TimeoutException)) {
|
if (e instanceof TimeoutException) {
|
||||||
// TimeoutExceptions are expected, no need to log
|
errorType = "timeout";
|
||||||
|
} else if (e instanceof java.nio.channels.ClosedChannelException) {
|
||||||
|
errorType = "closedChannel";
|
||||||
|
} else {
|
||||||
logger.warn("Send message failed", e);
|
logger.warn("Send message failed", e);
|
||||||
errorType = "other";
|
errorType = "other";
|
||||||
} else {
|
|
||||||
errorType = "timeout";
|
|
||||||
}
|
}
|
||||||
final Tags tags = Tags.of(
|
final Tags tags = Tags.of(
|
||||||
UserAgentTagUtil.getPlatformTag(client.getUserAgent()),
|
UserAgentTagUtil.getPlatformTag(client.getUserAgent()),
|
||||||
|
|
Loading…
Reference in New Issue