test: fix flaky test-gc-net-timeout
If the timeout is called in the time between 'end' and 'close' that would cause a EPIPE error. Essentially making the test flaky.
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