Issue #11081 - fix race condition in WebSocket FrameHandlers
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
This commit is contained in:
parent
f82844e2a2
commit
e69f1d2bef
|
@ -596,9 +596,10 @@ public class JavaxWebSocketFrameHandler implements FrameHandler
|
|||
}
|
||||
|
||||
// Accept the payload into the message sink
|
||||
activeMessageSink.accept(frame, callback);
|
||||
MessageSink messageSink = activeMessageSink;
|
||||
if (frame.isFin())
|
||||
activeMessageSink = null;
|
||||
messageSink.accept(frame, callback);
|
||||
}
|
||||
|
||||
public void onPing(Frame frame, Callback callback)
|
||||
|
|
|
@ -345,9 +345,10 @@ public class JettyWebSocketFrameHandler implements FrameHandler
|
|||
}
|
||||
|
||||
// Accept the payload into the message sink
|
||||
activeMessageSink.accept(frame, callback);
|
||||
MessageSink messageSink = activeMessageSink;
|
||||
if (frame.isFin())
|
||||
activeMessageSink = null;
|
||||
messageSink.accept(frame, callback);
|
||||
}
|
||||
|
||||
private void onBinaryFrame(Frame frame, Callback callback)
|
||||
|
|
Loading…
Reference in New Issue