sleep 0.001 before retrying on socket error