mirror of
https://github.com/signalapp/Signal-Server
synced 2026-04-19 19:48:04 +01:00
Handle static "closed" exceptions
This commit is contained in:
committed by
Jon Chambers
parent
6845ba9b90
commit
0ea13ec528
@@ -32,6 +32,7 @@ import java.util.concurrent.atomic.AtomicLong;
|
||||
import java.util.concurrent.atomic.AtomicReference;
|
||||
import java.util.concurrent.atomic.LongAdder;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.eclipse.jetty.util.StaticException;
|
||||
import org.reactivestreams.Publisher;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
@@ -445,6 +446,8 @@ public class WebSocketConnection implements WebSocketConnectionEventListener {
|
||||
errorType = "connectionClosed";
|
||||
} else if (e instanceof org.eclipse.jetty.io.EofException) {
|
||||
errorType = "connectionEof";
|
||||
} else if (e instanceof StaticException staticException && "Closed".equals(staticException.getMessage())) {
|
||||
errorType = "closedStatic";
|
||||
} else {
|
||||
logger.warn(terminal ? "Send message failure terminated stream" : "Send message failed", e);
|
||||
errorType = "other";
|
||||
|
||||
Reference in New Issue
Block a user