Skip to content

Commit

Permalink
Use connection host if TLS options host not specified (#179)
Browse files Browse the repository at this point in the history
  • Loading branch information
alandoherty committed Mar 24, 2021
1 parent 8ed3c24 commit 5c272fb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,9 @@ export class Client {
welcome = await this.connect(options.host, options.port)
}
if (useExplicitTLS) {
await this.useTLS(options.secureOptions)
let secureOptions = options.secureOptions || {}
secureOptions.host = secureOptions.host || options.host
await this.useTLS(secureOptions)
}
await this.login(options.user, options.password)
await this.useDefaultSettings()
Expand Down

0 comments on commit 5c272fb

Please sign in to comment.