File tree 1 file changed +5
-5
lines changed
1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -244,18 +244,18 @@ through a proxy with custom authentication this callback allows you to create yo
244
244
instance of a websocket which will be used in the mqtt client.
245
245
246
246
``` js
247
- const createWebsocket = createWebsocket (url, websocketSubProtocols, options) => {
247
+ const createWebsocket = (url , websocketSubProtocols , options ) => {
248
248
const subProtocols = [
249
249
websocketSubProtocols[0 ],
250
250
' myCustomSubprotocolOrOAuthToken' ,
251
251
]
252
252
return new WebSocket (url, subProtocols)
253
253
}
254
254
255
- const connection = await mqtt .connectAsync (< wss url> , {
256
- ... ,
257
- createWebsocket: createWebsocket,
258
- });
255
+ const client = await mqtt .connectAsync (< wss url> , {
256
+ ... ,
257
+ createWebsocket: createWebsocket,
258
+ });
259
259
```
260
260
261
261
#### Enabling Reconnection with ` reconnectPeriod ` option
You can’t perform that action at this time.
0 commit comments