Issue #9682 - changes from review

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
This commit is contained in:
Lachlan Roberts 2023-06-08 20:05:02 +10:00
parent a0fe47e1e8
commit 0fd8bd2b2f
1 changed files with 6 additions and 6 deletions

View File

@ -294,14 +294,14 @@ public class JettyWebSocketFrameHandler implements FrameHandler
this.delayedCallback = null;
}
CloseException closeException = new CloseException(closeStatus.getCode(), closeStatus.getCause());
if (delayedCallback != null)
delayedCallback.failed(new CloseException(closeStatus.getCode(), closeStatus.getCause()));
delayedCallback.failed(closeException);
if (activeMessageSink != null)
{
activeMessageSink.fail(new CloseException(closeStatus.getCode(), closeStatus.getCause()));
activeMessageSink = null;
}
if (textSink != null)
textSink.fail(closeException);
if (binarySink != null)
binarySink.fail(closeException);
notifyOnClose(closeStatus, callback);
container.notifySessionListeners((listener) -> listener.onWebSocketSessionClosed(session));