Skip to content

Check NetworkRequest#mDestroyed before each network request? #563

@stefan-niedermann

Description

@stefan-niedermann

I recently ran into an issue while trying to make a network request on an NextcloudAPI instance, on which I called close() before.

Of course, it failed, but at an odd place, that I didn't expected (I think context was null at some place).

This made me wondering why we do check for NetworkRequest#mDestroyed when connecting, but not before each request. Wouldn't make it sense to add this check also at the beginning of AidlNetworkRequest#performNetworkRequestV2 and throw a more meaningful IllegalStateException or something alike?

cc @David-Development

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions