Merge pull request #11084 from jetty/jetty-10.0.x-11081-websocketRace
Issue #11081 - fix race condition in WebSocket FrameHandlers
This commit is contained in:
commit
1fb3f313ce
|
@ -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