This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 8.5.x in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/8.5.x by this push: new 0e49ce6644 Fix back-port 0e49ce6644 is described below commit 0e49ce6644a5ed25694bbe9136502c71cf0fee78 Author: Mark Thomas <ma...@apache.org> AuthorDate: Thu Apr 6 16:33:53 2023 +0100 Fix back-port --- .../TestWsRemoteEndpointImplServerDeadlock.java | 23 ++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/test/org/apache/tomcat/websocket/server/TestWsRemoteEndpointImplServerDeadlock.java b/test/org/apache/tomcat/websocket/server/TestWsRemoteEndpointImplServerDeadlock.java index de49113382..f7074a9009 100644 --- a/test/org/apache/tomcat/websocket/server/TestWsRemoteEndpointImplServerDeadlock.java +++ b/test/org/apache/tomcat/websocket/server/TestWsRemoteEndpointImplServerDeadlock.java @@ -180,21 +180,24 @@ public class TestWsRemoteEndpointImplServerDeadlock extends WebSocketBaseTest { private boolean sendOnContainerThread = initialSendOnContainerThread; @OnOpen - public void onOpen(Session session) { + public void onOpen(final Session session) { serverSession = session; // Send messages to the client until they appear to hang // Need to do this on a non-container thread - Runnable r = () -> { - Future<Void> sendMessageFuture; - while (true) { - sendMessageFuture = session.getAsyncRemote().sendText(MSG); - try { - sendMessageFuture.get(2, TimeUnit.SECONDS); - } catch (InterruptedException | ExecutionException | TimeoutException e) { - break; + Runnable r = new Runnable() { + @Override + public void run() { + Future<Void> sendMessageFuture; + while (true) { + sendMessageFuture = session.getAsyncRemote().sendText(MSG); + try { + sendMessageFuture.get(2, TimeUnit.SECONDS); + } catch (InterruptedException | ExecutionException | TimeoutException e) { + break; + } } + serverSendLatch.countDown(); } - serverSendLatch.countDown(); }; if (sendOnContainerThread) { r.run(); --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org