Croway commented on code in PR #28357:
URL: https://github.com/apache/camel/pull/28357#discussion_r4360992135


##########
components/camel-vertx/camel-vertx-websocket/src/main/java/org/apache/camel/component/vertx/websocket/VertxWebsocketComponent.java:
##########
@@ -190,6 +191,17 @@ public void connectConsumer(VertxWebsocketConsumer 
consumer) {
             return createVertxWebsocketHost(hostConfiguration, hostKey);
         });
 
+        // every consumer on this host and port is served by the one server 
the first consumer configured, so a consumer
+        // with other SSLContextParameters cannot be served with them, and 
must not start as if it were
+        SSLContextParameters hostSslContextParameters = 
host.getHostConfiguration().getSslContextParameters();
+        if (configuration.getSslContextParameters() != 
hostSslContextParameters) {
+            throw new IllegalArgumentException(
+                    "Cannot start the consumer for " + 
configuration.getWebsocketURI() + " because the server on "
+                                               + hostKey + " is already 
serving consumers with different "
+                                               + "sslContextParameters. All 
consumers on the same host and port must "
+                                               + "use the same 
SSLContextParameters instance.");

Review Comment:
   Thanks, good point. Changed in 52c0a8630f83: rather than mentioning null, 
the message now says whether the server on that host and port was started 
without TLS or with other sslContextParameters, and ends with "must use the 
same SSLContextParameters instance, or none".



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to