dgram: don't hide implicit bind errors
When dgram socket implicit binding fails, an attempt is made to
clean up the send queue. This was originally implemented using
an 'error'
handler that performed cleanup and then emitted a
fake error, which concealed the original error. This was done
to prevent cases where the same error was emitted twice. Now
that the errorMonitor
event is available, use that to perform
the cleanup without impacting the actual error handling.
The second commit removes the ERR_SOCKET_CANNOT_SEND
error, which is now unused.
Refs: https://github.com/nodejs/help/issues/2484 cc: @bnoordhuis
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
tests and/or benchmarks are included -
documentation is changed or added -
commit message follows commit guidelines