We should wait for a server thread to actually listen(2) a server socket before trying to connect to it. This hopefully should make the test less flaky.