Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reimplement connection_lost handler cancellation #2675

Closed
hellysmile opened this issue Jan 21, 2018 · 1 comment
Closed

Reimplement connection_lost handler cancellation #2675

hellysmile opened this issue Jan 21, 2018 · 1 comment

Comments

@hellysmile
Copy link
Member

Long story short

New issue for #2098

Proposal is:

  • drop auto-cancellation for next major release 3.x
  • cancellation can be controlled by user by new request property,
    for example
async def handler(request):
    request.cancel_on_lost = False

As well on route level

app.router.add_get('/', handle, cancel_on_lost=True)

Or even on application level

app = web.Application(cancel_on_lost=True)

Default parameter for all ways should be False

self._task_handler.cancel()
should check request.cancel_on_lost attribute

Expected behaviour

Cancellation should be controlled by end user

Actual behaviour

There is no way to disable cancellation

Steps to reproduce

#2098

@Dreamsorcerer
Copy link
Member

I don't the this particular API will be implemented. We've added an option to enable/disable globally, and as per the documentation, it is possible to use aiojobs.aiohttp.atomic to effectively disable on individual handlers.

@Dreamsorcerer Dreamsorcerer closed this as not planned Won't fix, can't repro, duplicate, stale Aug 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants