Skip to content

Conversation

thewhaleking
Copy link
Collaborator

The missed return when reconnecting caused the cancelled exception to be propagated even when reconnecting.

Also, we had to check task.cancelled() before task.result() before checking to see if the result was an exception, because calling task.result() or task.exception() on a task with a pending asyncio.CancelledError raises that exception rather than handling it.

Also improves debug logging.

@github-actions github-actions bot added run-bittensor-cli-tests Runs BTCLI tests. run-bittensor-sdk-tests Runs Bittensor SDK tests. labels Sep 26, 2025
@thewhaleking thewhaleking requested a review from a team September 29, 2025 15:26
@thewhaleking thewhaleking merged commit 92af9b2 into staging Sep 29, 2025
84 of 85 checks passed
@thewhaleking thewhaleking deleted the fix/thewhaleking/cancellation-fix branch September 29, 2025 16:27
@thewhaleking thewhaleking mentioned this pull request Oct 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
run-bittensor-cli-tests Runs BTCLI tests. run-bittensor-sdk-tests Runs Bittensor SDK tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants