Skip to content

URLSession is never invalidated, leading to file descriptor exhaustion an API #2

@shrudge

Description

@shrudge
Image

As seen in the screenshot of the initializer a new URLSession is created for every client instance. However because there is no deinit block added to the class, session.invalidateAndCancel() is never called when the client is destroyed, resulting in orphaned sockets.

To fix this a deinit block must be added to invalidate the session when the client is deallocated

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