test: retry when write to a socket fails on macOS
test: retry when write to a socket fails on macOS

If the socket is tearing down macOS will return EPROTOTYPE instead of EPIPE.
Because python doesn't handle this internally we have to do a workaround and retry the request.
See https://bugs.python.org/issue33450


Former-commit-id: 7a0cf79c04f297e6f696dd6c79b73b362719063b
syscoin/syscoin,syscoin/syscoin,syscoin/syscoin,syscoin/syscoin,syscoin/syscoin,syscoin/syscoin,syscoin/syscoin,syscoin/syscoin