The Client is leaking its private URLSession out in the initializer public init(configuration: Configuration, sessionConfiguration: ((inout URLSession) -> Void)? = nil) but stores it as a private member. Consider making the session public or remove the configurability from the initializer.