net: emit "write after end" errors in the next tick
This commit makes those errors caused by calling net.Socket.write()
after sockets ending be emitted in the next tick.
This should be "semver-major".
Partially fixes: https://github.com/nodejs/node/issues/24111
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
tests and/or benchmarks are included -
commit message follows commit guidelines