Fixes flaky tcp write test: Binds listener before moving it to a separate thread. Should probably be enough.
thread::sleep before connecting TcpStream
thread::sleep