Merge pull request #11086 from jetty/jetty-12.0.x-11081-websocketRace
Issue #11081 - fix race condition in WebSocket FrameHandlers (jetty-12)
This commit is contained in:
commit
2505d0e8a6
|
@ -389,9 +389,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);
|
||||
}
|
||||
|
||||
boolean isAutoDemand()
|
||||
|
|
|
@ -583,9 +583,10 @@ public class JakartaWebSocketFrameHandler 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)
|
||||
|
|
|
@ -590,9 +590,10 @@ public class JakartaWebSocketFrameHandler 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)
|
||||
|
|
|
@ -329,9 +329,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