I have this server, client code in which we run the server as a subprocess in py.test and create a client object and connect it with client.
But I am getting the Connection Refused error, when I am tracing it to open() function wherein the socket is trying to connect to ip and port.
There a comment is mentioned that For Connection refused errors, work around startup races.
What are the different ways, I can fix the startup race issue?