File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
sdk/src/main/java/software/amazon/awssdk/iot Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -516,6 +516,14 @@ public MqttClientConnection build() {
516516 // This does mean that once you call build() once, modifying the tls context options or client bootstrap
517517 // has no affect on subsequently-created connections.
518518 synchronized (this ) {
519+ // Is this going to a custom authorizer at the correct (443) port? If so change the alpnList to "mqtt".
520+ if (config .getUsername () != null ) {
521+ if (config .getUsername ().contains ("x-amz-customauthorizer-name" ) && config .getPort () == 443 ) {
522+ tlsOptions .alpnList .clear ();
523+ tlsOptions .alpnList .add ("mqtt" );
524+ }
525+ }
526+
519527 if (tlsOptions != null && (tlsContext == null || resetLazilyCreatedResources )) {
520528 try (ClientTlsContext clientTlsContext = new ClientTlsContext (tlsOptions )) {
521529 swapReferenceTo (tlsContext , clientTlsContext );
You can’t perform that action at this time.
0 commit comments