diff --git a/test/parallel/test-dgram-send-callback-buffer-empty-address.js b/test/parallel/test-dgram-send-callback-buffer-empty-address.js index 67e64d6bfefd8c..5b3b1c41a1917c 100644 --- a/test/parallel/test-dgram-send-callback-buffer-empty-address.js +++ b/test/parallel/test-dgram-send-callback-buffer-empty-address.js @@ -14,4 +14,4 @@ const onMessage = common.mustCall(function(err, bytes) { client.close(); }); -client.send(buf, common.PORT, onMessage); +client.bind(0, () => client.send(buf, client.address().port, onMessage));