Skip to content

Commit 8cef83a

Browse files
lightsofapollomanueliglesias
authored andcommitted
feat(subscriptions): Detect if we should use ssl via the mqtt url (#151)
1 parent 1567ea1 commit 8cef83a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/aws-appsync/src/link/subscription-handshake-link.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ export class SubscriptionHandshakeLink extends ApolloLink {
167167

168168
return new Promise((resolve, reject) => {
169169
client.connect({
170-
useSSL: true,
170+
useSSL: url.indexOf('wss://') === 0,
171171
mqttVersion: 3,
172172
onSuccess: () => resolve(client),
173173
onFailure: reject,

0 commit comments

Comments
 (0)