Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions lib/connectors/StandaloneConnector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ export default class StandaloneConnector extends AbstractConnector {

if (options.tls) {
Object.assign(connectionOptions, options.tls);
if ("host" in connectionOptions && !("servername" in connectionOptions)) {
(connectionOptions as any).servername = (connectionOptions as TcpOptions).host;
}
Comment thread
cursor[bot] marked this conversation as resolved.
}
Comment on lines 42 to 50

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think adding the tls.servername even when tls is undefined would be a good improvement.

In my case, where I'm using only the tls.servername, I would need to set an empty tls: {} to trigger this servername logic, which would be kinda weird.

I believe setting the servername for non-TLS connections isn't a breaking change, right?


// TODO:
Expand Down
Loading