Skip to content

Commit

Permalink
fix: changed substr to slice (asyncapi#336) (asyncapi#345)
Browse files Browse the repository at this point in the history
Co-authored-by: ankitchaudharyy-TW <[email protected]>
  • Loading branch information
2 people authored and Ruchip16 committed Jan 11, 2023
1 parent 0ed345d commit be257cd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/adapters/mqtt/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class MqttAdapter extends Adapter {
this.client = mqtt.connect({
host: url.host,
port: url.port || (url.protocol === 'mqtt:' ? 1883 : 8883),
protocol: url.protocol.substr(0, url.protocol.length - 1),
protocol: url.protocol.slice(0, url.protocol.length - 1),
clientId: serverBinding && serverBinding.clientId,
clean: serverBinding && serverBinding.cleanSession,
will: serverBinding && serverBinding.will && {
Expand Down

0 comments on commit be257cd

Please sign in to comment.