Skip to content

Commit

Permalink
fix(cli): fix protocol type
Browse files Browse the repository at this point in the history
  • Loading branch information
Red-Asuka committed May 9, 2024
1 parent b0a9246 commit 3b5e21d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
2 changes: 1 addition & 1 deletion cli/src/types/global.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ declare global {

type MQTTVersion = 3 | 4 | 5

type Protocol = 'mqtt' | 'mqtts'
type Protocol = 'mqtt' | 'mqtts' | 'ws' | 'wss'

type QoS = 0 | 1 | 2

Expand Down
4 changes: 0 additions & 4 deletions cli/src/utils/parse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -244,10 +244,6 @@ const parseConnectOptions = (
connectOptions.ca = fs.readFileSync(ca)
}

if (key && cert && protocol !== 'mqtts') {
connectOptions.protocol = 'mqtts'
}

if (insecure) {
connectOptions.rejectUnauthorized = false
}
Expand Down

0 comments on commit 3b5e21d

Please sign in to comment.