Skip to content

Commit

Permalink
fix: remove superfluous special handling of asyncio.CancelledError
Browse files Browse the repository at this point in the history
  • Loading branch information
devkral committed Jul 5, 2023
1 parent 78ad0b3 commit d75d2b8
Showing 1 changed file with 0 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,6 @@ async def handle_connection_init_timeout(self) -> None:
self.connection_timed_out = True
reason = "Connection initialisation timeout"
await self.close(code=4408, reason=reason)
except asyncio.CancelledError:
# asyncio.CancelledError should not be handled in handle_task_exception
# In some python versions asyncio.CancelledError inherits from Exception
raise
except Exception as error:
await self.handle_task_exception(error) # pragma: no cover
finally:
Expand Down Expand Up @@ -313,11 +309,6 @@ async def handle_async_results(
]
next_message = NextMessage(id=operation.id, payload=next_payload)
await operation.send_message(next_message)
except asyncio.CancelledError:
# CancelledErrors are expected during task cleanup and
# should not be handled in process_error.
# In some python versions asyncio.CancelledError inherits from Exception.
raise
except Exception as error:
# GraphQLErrors are handled by graphql-core and included in the
# ExecutionResult
Expand Down

0 comments on commit d75d2b8

Please sign in to comment.