diff --git a/src/cmap/connect.ts b/src/cmap/connect.ts index 615e4d9f952..8972b6dbe8d 100644 --- a/src/cmap/connect.ts +++ b/src/cmap/connect.ts @@ -248,7 +248,7 @@ function parseSslOptions(options: ConnectionOptions): TLSConnectionOpts { } // Set default sni servername to be the same as host - if (result.servername == null) { + if (result.servername == null && result.host && !net.isIP(result.host)) { result.servername = result.host; }