Skip to content

Commit 249cf06

Browse files
MakendranGrakshil14-2
authored andcommitted
Update PubSub5.tsx
1 parent 2c7cd2d commit 249cf06

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

samples/browser/react_sample/src/PubSub5.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,10 @@ function createClient(provider: AWSCognitoCredentialsProvider) : mqtt5.Mqtt5Clie
7777
let builder: iot.AwsIotMqtt5ClientConfigBuilder = iot.AwsIotMqtt5ClientConfigBuilder.newWebsocketMqttBuilderWithSigv4Auth(
7878
AWS_IOT_ENDPOINT,
7979
wsConfig
80-
)
80+
);
8181
builder.withConnectProperties({
82-
clientId: "test-" + Math.floor(Math.random() * 100000000)
82+
clientId: "test-" + Math.floor(Math.random() * 100000000),
83+
keepAliveIntervalSeconds: 30 // Mandatory field added
8384
});
8485

8586
let client : mqtt5.Mqtt5Client = new mqtt5.Mqtt5Client(builder.build());

0 commit comments

Comments
 (0)