Skip to content

Commit 9effe97

Browse files
committed
Update SocketTransport.ts
1 parent 44bff53 commit 9effe97

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/@hprose/rpc-node/src/SocketTransport.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
| |
99
| SocketTransport for TypeScript. |
1010
| |
11-
| LastModified: Dec 17, 2019 |
11+
| LastModified: Dec 18, 2019 |
1212
| Author: Ma Bingyao <[email protected]> |
1313
| |
1414
\*________________________________________________________*/
@@ -41,7 +41,7 @@ export class SocketTransport implements Transport {
4141
case 'ssl4:':
4242
case 'ssl6:': {
4343
const options: net.TcpNetConnectOpts = Object.create(null);
44-
options.host = parser.hostname;
44+
options.host = parser.hostname ?? undefined;
4545
options.port = parser.port ? parseInt(parser.port, 10) : 8412;
4646
switch (protocol) {
4747
case 'tcp4:':

0 commit comments

Comments
 (0)