Skip to content

Should cancel_on_connection_lost be false by default? #323

@anarthal

Description

@anarthal

I'd like to discuss the possibility of changing request::config::cancel_on_connection_lost default to false. The reason being that I see both cancel_if_not_connected and cancel_on_connection_lost as the same thing - answering "do I want to make this request fail ASAP, or should I try to wait until the server is up?". cancel_if_not_connected defaults to false, while cancel_on_connection_lost defaults to true, which makes it confusing IMO.

These are very handy for tests, but IDK if they've got any real usage now that we're about to have support for cancel_after. Maybe we could deprecate the flags in addition to changing the default.

Note that I don't think this change will break a lot of users, if any.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions