Author: remy.maucherat(a)jboss.com
Date: 2015-01-27 07:47:55 -0500 (Tue, 27 Jan 2015)
New Revision: 2586
Modified:
branches/7.5.x/src/main/java/org/apache/tomcat/websocket/WsWebSocketContainer.java
Log:
BZ1155189: As found out by Radim Hatlapatka, entropy can cause a delay in the middle of an
IO operation. Move the entropy problem to the initial connection (unless the client sends
messages concurrently).
Modified:
branches/7.5.x/src/main/java/org/apache/tomcat/websocket/WsWebSocketContainer.java
===================================================================
---
branches/7.5.x/src/main/java/org/apache/tomcat/websocket/WsWebSocketContainer.java 2015-01-27
09:22:22 UTC (rev 2585)
+++
branches/7.5.x/src/main/java/org/apache/tomcat/websocket/WsWebSocketContainer.java 2015-01-27
12:47:55 UTC (rev 2586)
@@ -209,6 +209,9 @@
boolean secure = false;
+ // Entropy can cause a delay, so initialize here at least one random
+ Util.generateMask();
+
String scheme = path.getScheme();
if (!("ws".equalsIgnoreCase(scheme) ||
"wss".equalsIgnoreCase(scheme))) {
Show replies by date