mirror of
https://github.com/signalapp/Signal-Server.git
synced 2026-12-01 11:56:47 +00:00
Add ClosedChannelException to expected errors
This commit is contained in:
1 parent
43f83076fa
commit
a6d11789e9
1 file changed
+5
-4
+5
-4
@@ -367,12 +367,13 @@ public class WebSocketConnection implements MessageAvailabilityListener, Displac
|
||||
.orTimeout(sendFuturesTimeoutMillis, TimeUnit.MILLISECONDS))
|
||||
.doOnError(e -> {
|
||||
final String errorType;
|
||||
if (!(e instanceof TimeoutException)) {
|
||||
// TimeoutExceptions are expected, no need to log
|
||||
if (e instanceof TimeoutException) {
|
||||
errorType = "timeout";
|
||||
} else if (e instanceof java.nio.channels.ClosedChannelException) {
|
||||
errorType = "closedChannel";
|
||||
} else {
|
||||
logger.warn("Send message failed", e);
|
||||
errorType = "other";
|
||||
} else {
|
||||
errorType = "timeout";
|
||||
}
|
||||
final Tags tags = Tags.of(
|
||||
UserAgentTagUtil.getPlatformTag(client.getUserAgent()),
|
||||
|
||||
Reference in new issue
Block a user