From 6a4fd381d3685be5c8c0547d21cc814e2c07b744 Mon Sep 17 00:00:00 2001 From: andot Date: Wed, 18 Dec 2019 04:42:55 +0800 Subject: [PATCH] Update UdpTransport.ts --- packages/@hprose/rpc-node/src/UdpTransport.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/@hprose/rpc-node/src/UdpTransport.ts b/packages/@hprose/rpc-node/src/UdpTransport.ts index d4edff8..cca9233 100644 --- a/packages/@hprose/rpc-node/src/UdpTransport.ts +++ b/packages/@hprose/rpc-node/src/UdpTransport.ts @@ -8,7 +8,7 @@ | | | UdpTransport for TypeScript. | | | -| LastModified: Dec 17, 2019 | +| LastModified: Dec 18, 2019 | | Author: Ma Bingyao | | | \*________________________________________________________*/ @@ -122,7 +122,7 @@ export class UdpTransport implements Transport { const crc = crc32(new Uint8Array(header.buffer, header.byteOffset + 4, 4)); header.writeInt32BE(crc, 0); const body = Buffer.from(request.buffer, request.byteOffset, request.length); - socket.send([header, body], parser.port ? parseInt(parser.port, 10) : 8412, parser.hostname, (error) => { + socket.send([header, body], parser.port ? parseInt(parser.port, 10) : 8412, parser.hostname ?? undefined, (error) => { if (error) { delete results[index]; result.reject(error);