src: fix StreamPipe cleanup & interaction with env handles
src: do not access Environment-owned handles after cleanup
Do not access handles that have already begun to be closed or are closed.
StreamPipe
in destructor
src: clean up In the presence of Workers, it is not safe to assume that
StreamPipe::Unpipe()
has been called at the time when the object
is destroyed.
Instead, clean up when the destructor is called.
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
tests and/or benchmarks are included -
commit message follows commit guidelines