Fix hang in new socket tests on linux