dgram: generalized send queue to handle close
Checklist
-
make -j8 test
(UNIX), orvcbuild test nosign
(Windows) passes -
tests and/or benchmarks are included -
commit message follows commit guidelines
Affected core subsystem(s)
dgram
Description of change
If the udp socket is not ready and we are accumulating messages to send, it needs to delay closing the socket when all messages are flushed.
Backport of https://github.com/nodejs/node/pull/7066
cc @TheAlphaNerd