Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34.2k
Closed
Labels
confirmed-bugIssues with confirmed bugs.Issues with confirmed bugs.dgramIssues and PRs related to the dgram subsystem / UDP.Issues and PRs related to the dgram subsystem / UDP.macosIssues and PRs related to the macOS platform / OSX.Issues and PRs related to the macOS platform / OSX.
Description
- Version:
v12.12.0 - Platform:
macos catalina/10.15 (19A602) - Subsystem:
n/a
When sending an empty udp message, the message will not be received until another non-empty udp message is received.
Example/Reproduce: (may only affect macos 10.15?)
file server.js
var PORT = 33333; var HOST = '127.0.0.1'; var dgram = require('dgram'); var server = dgram.createSocket('udp4'); server.on('listening', function(){var address = server.address(); console.log('UDP Server listening on ' + address.address + ':' + address.port)}); server.on('message', function(message, remote){console.log(remote.address + ':' + remote.port +' - ' + message)}); server.bind(PORT, HOST); file client_test.js
var PORT = 33333; var HOST = '127.0.0.1'; var dgram = require('dgram'); var client = dgram.createSocket('udp4'); var message = Buffer.from('abc'); client.send(message, 0, message.length, PORT, HOST, function(err, bytes){if (err) throw err; console.log('UDP message sent to ' + HOST +':'+ PORT); client.close()}); file client_0.js
var PORT = 33333; var HOST = '127.0.0.1'; var dgram = require('dgram'); var client = dgram.createSocket('udp4'); var message = Buffer.from(''); client.send(message, 0, message.length, PORT, HOST, function(err, bytes){if (err) throw err; console.log('UDP message sent to ' + HOST +':'+ PORT); client.close()}); run the server code, then run the client_0.js: no response in server.
followed by running client_test.js: server got empty and the "abc" message.
Metadata
Metadata
Assignees
Labels
confirmed-bugIssues with confirmed bugs.Issues with confirmed bugs.dgramIssues and PRs related to the dgram subsystem / UDP.Issues and PRs related to the dgram subsystem / UDP.macosIssues and PRs related to the macOS platform / OSX.Issues and PRs related to the macOS platform / OSX.