Skip to content

Commit 6a4fd38

Browse files
committed
Update UdpTransport.ts
1 parent 9effe97 commit 6a4fd38

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
| |
99
| UdpTransport for TypeScript. |
1010
| |
11-
| LastModified: Dec 17, 2019 |
11+
| LastModified: Dec 18, 2019 |
1212
| Author: Ma Bingyao <andot@hprose.com> |
1313
| |
1414
\*________________________________________________________*/
@@ -122,7 +122,7 @@ export class UdpTransport implements Transport {
122122
const crc = crc32(new Uint8Array(header.buffer, header.byteOffset + 4, 4));
123123
header.writeInt32BE(crc, 0);
124124
const body = Buffer.from(request.buffer, request.byteOffset, request.length);
125-
socket.send([header, body], parser.port ? parseInt(parser.port, 10) : 8412, parser.hostname, (error) => {
125+
socket.send([header, body], parser.port ? parseInt(parser.port, 10) : 8412, parser.hostname ?? undefined, (error) => {
126126
if (error) {
127127
delete results[index];
128128
result.reject(error);

0 commit comments

Comments
 (0)