Open JPfeP opened 5 years ago
Yes, i've add issues with that as well, tried adding a microsleep (with a much lower value than that), and the CI was still flacky, so for now i rely on retrying when that happens. But indeed it could be a good idea to make stop and stop_all do this directly. We can allow disabling it if people don't plan to reopen on the same port.
Hello,
I had a bug showing only when trying to reopen a server with the same IP (or changing from 0.0.0.0 to 127.0.0.1) and same port settings after a close() function.
The error message is that the port is already in use.
The solution I found was to introduce a delay using:
time.sleep(.01)
10ms was the minimal value to avoid the issue.