diff --git a/samples/BasicPubSub/src/main/java/pubsub/PubSub.java b/samples/BasicPubSub/src/main/java/pubsub/PubSub.java
index cfb065276..803f0a332 100644
--- a/samples/BasicPubSub/src/main/java/pubsub/PubSub.java
+++ b/samples/BasicPubSub/src/main/java/pubsub/PubSub.java
@@ -251,19 +251,19 @@ public void onConnectionResumed(boolean sessionPresent) {
.withCleanSession(true)
.withProtocolOperationTimeoutMs(60000);
+ HttpProxyOptions proxyOptions = null;
+ if (proxyHost != null && proxyPort > 0) {
+ proxyOptions = new HttpProxyOptions();
+ proxyOptions.setHost(proxyHost);
+ proxyOptions.setPort(proxyPort);
+
+ builder.withHttpProxyOptions(proxyOptions);
+ }
+
if (useWebsockets) {
builder.withWebsockets(true);
builder.withWebsocketSigningRegion(region);
- HttpProxyOptions proxyOptions = null;
- if (proxyHost != null && proxyPort > 0) {
- proxyOptions = new HttpProxyOptions();
- proxyOptions.setHost(proxyHost);
- proxyOptions.setPort(proxyPort);
-
- builder.withWebsocketProxyOptions(proxyOptions);
- }
-
if (useX509Credentials) {
try (TlsContextOptions x509TlsOptions = TlsContextOptions.createWithMtlsFromPath(x509CertPath, x509KeyPath)) {
if (x509RootCaPath != null) {
diff --git a/samples/PubSubStress/src/main/java/pubsubstress/PubSubStress.java b/samples/PubSubStress/src/main/java/pubsubstress/PubSubStress.java
index e079fffcc..1b2f8f9c5 100644
--- a/samples/PubSubStress/src/main/java/pubsubstress/PubSubStress.java
+++ b/samples/PubSubStress/src/main/java/pubsubstress/PubSubStress.java
@@ -337,19 +337,20 @@ public static void main(String[] args) {
builder.withCertificateAuthorityFromPath(null, rootCaPath)
.withEndpoint(endpoint)
.withCleanSession(true)
- .withBootstrap(clientBootstrap);
+ .withBootstrap(clientBootstrap)
+ .withProtocolOperationTimeoutMs(10000);
+
+ if (proxyHost != null && proxyPort > 0) {
+ HttpProxyOptions proxyOptions = new HttpProxyOptions();
+ proxyOptions.setHost(proxyHost);
+ proxyOptions.setPort(proxyPort);
+
+ builder.withHttpProxyOptions(proxyOptions);
+ }
if (useWebsockets) {
builder.withWebsockets(true);
builder.withWebsocketSigningRegion(region);
-
- if (proxyHost != null && proxyPort > 0) {
- HttpProxyOptions proxyOptions = new HttpProxyOptions();
- proxyOptions.setHost(proxyHost);
- proxyOptions.setPort(proxyPort);
-
- builder.withWebsocketProxyOptions(proxyOptions);
- }
}
try {
diff --git a/sdk/pom.xml b/sdk/pom.xml
index d583c8a0e..e819a7e1b 100644
--- a/sdk/pom.xml
+++ b/sdk/pom.xml
@@ -42,7 +42,7 @@
software.amazon.awssdk.crt
aws-crt
- 0.12.4
+ 0.12.6
junit
diff --git a/sdk/src/main/java/software/amazon/awssdk/iot/AwsIotMqttConnectionBuilder.java b/sdk/src/main/java/software/amazon/awssdk/iot/AwsIotMqttConnectionBuilder.java
index 5d445f131..b6d8045e7 100644
--- a/sdk/src/main/java/software/amazon/awssdk/iot/AwsIotMqttConnectionBuilder.java
+++ b/sdk/src/main/java/software/amazon/awssdk/iot/AwsIotMqttConnectionBuilder.java
@@ -363,12 +363,24 @@ public AwsIotMqttConnectionBuilder withWebsocketHandshakeTransform(Consumer