forked from loafle/openapi-generator-original
* Remove weak self to fix too early deallocations * Update samples * Remove podfile lock * Run pod install on samples/client/test/swift5/default/TestClientApp/ * Revert "Run pod install on samples/client/test/swift5/default/TestClientApp/" This reverts commit 5ad327c70789a6ab50e372a5bbc2cfa3b0a7f883.
This commit is contained in:
parent
7654356df2
commit
f6019f00a1
@ -132,15 +132,11 @@ private var urlSessionStore = SynchronizedDictionary<String, URLSession>()
|
||||
do {
|
||||
let request = try createURLRequest(urlSession: urlSession, method: xMethod, encoding: encoding, headers: headers)
|
||||
|
||||
let dataTask = urlSession.dataTask(with: request) { [weak self] data, response, error in
|
||||
|
||||
guard let self = self else { return }
|
||||
let dataTask = urlSession.dataTask(with: request) { data, response, error in
|
||||
|
||||
if let taskCompletionShouldRetry = self.taskCompletionShouldRetry {
|
||||
|
||||
taskCompletionShouldRetry(data, response, error) { [weak self] shouldRetry in
|
||||
|
||||
guard let self = self else { return }
|
||||
taskCompletionShouldRetry(data, response, error) { shouldRetry in
|
||||
|
||||
if shouldRetry {
|
||||
cleanupRequest()
|
||||
|
@ -132,15 +132,11 @@ open class URLSessionRequestBuilder<T>: RequestBuilder<T> {
|
||||
do {
|
||||
let request = try createURLRequest(urlSession: urlSession, method: xMethod, encoding: encoding, headers: headers)
|
||||
|
||||
let dataTask = urlSession.dataTask(with: request) { [weak self] data, response, error in
|
||||
|
||||
guard let self = self else { return }
|
||||
let dataTask = urlSession.dataTask(with: request) { data, response, error in
|
||||
|
||||
if let taskCompletionShouldRetry = self.taskCompletionShouldRetry {
|
||||
|
||||
taskCompletionShouldRetry(data, response, error) { [weak self] shouldRetry in
|
||||
|
||||
guard let self = self else { return }
|
||||
taskCompletionShouldRetry(data, response, error) { shouldRetry in
|
||||
|
||||
if shouldRetry {
|
||||
cleanupRequest()
|
||||
|
@ -132,15 +132,11 @@ open class URLSessionRequestBuilder<T>: RequestBuilder<T> {
|
||||
do {
|
||||
let request = try createURLRequest(urlSession: urlSession, method: xMethod, encoding: encoding, headers: headers)
|
||||
|
||||
let dataTask = urlSession.dataTask(with: request) { [weak self] data, response, error in
|
||||
|
||||
guard let self = self else { return }
|
||||
let dataTask = urlSession.dataTask(with: request) { data, response, error in
|
||||
|
||||
if let taskCompletionShouldRetry = self.taskCompletionShouldRetry {
|
||||
|
||||
taskCompletionShouldRetry(data, response, error) { [weak self] shouldRetry in
|
||||
|
||||
guard let self = self else { return }
|
||||
taskCompletionShouldRetry(data, response, error) { shouldRetry in
|
||||
|
||||
if shouldRetry {
|
||||
cleanupRequest()
|
||||
|
@ -132,15 +132,11 @@ open class URLSessionRequestBuilder<T>: RequestBuilder<T> {
|
||||
do {
|
||||
let request = try createURLRequest(urlSession: urlSession, method: xMethod, encoding: encoding, headers: headers)
|
||||
|
||||
let dataTask = urlSession.dataTask(with: request) { [weak self] data, response, error in
|
||||
|
||||
guard let self = self else { return }
|
||||
let dataTask = urlSession.dataTask(with: request) { data, response, error in
|
||||
|
||||
if let taskCompletionShouldRetry = self.taskCompletionShouldRetry {
|
||||
|
||||
taskCompletionShouldRetry(data, response, error) { [weak self] shouldRetry in
|
||||
|
||||
guard let self = self else { return }
|
||||
taskCompletionShouldRetry(data, response, error) { shouldRetry in
|
||||
|
||||
if shouldRetry {
|
||||
cleanupRequest()
|
||||
|
@ -132,15 +132,11 @@ internal class URLSessionRequestBuilder<T>: RequestBuilder<T> {
|
||||
do {
|
||||
let request = try createURLRequest(urlSession: urlSession, method: xMethod, encoding: encoding, headers: headers)
|
||||
|
||||
let dataTask = urlSession.dataTask(with: request) { [weak self] data, response, error in
|
||||
|
||||
guard let self = self else { return }
|
||||
let dataTask = urlSession.dataTask(with: request) { data, response, error in
|
||||
|
||||
if let taskCompletionShouldRetry = self.taskCompletionShouldRetry {
|
||||
|
||||
taskCompletionShouldRetry(data, response, error) { [weak self] shouldRetry in
|
||||
|
||||
guard let self = self else { return }
|
||||
taskCompletionShouldRetry(data, response, error) { shouldRetry in
|
||||
|
||||
if shouldRetry {
|
||||
cleanupRequest()
|
||||
|
@ -132,15 +132,11 @@ open class URLSessionRequestBuilder<T>: RequestBuilder<T> {
|
||||
do {
|
||||
let request = try createURLRequest(urlSession: urlSession, method: xMethod, encoding: encoding, headers: headers)
|
||||
|
||||
let dataTask = urlSession.dataTask(with: request) { [weak self] data, response, error in
|
||||
|
||||
guard let self = self else { return }
|
||||
let dataTask = urlSession.dataTask(with: request) { data, response, error in
|
||||
|
||||
if let taskCompletionShouldRetry = self.taskCompletionShouldRetry {
|
||||
|
||||
taskCompletionShouldRetry(data, response, error) { [weak self] shouldRetry in
|
||||
|
||||
guard let self = self else { return }
|
||||
taskCompletionShouldRetry(data, response, error) { shouldRetry in
|
||||
|
||||
if shouldRetry {
|
||||
cleanupRequest()
|
||||
|
@ -132,15 +132,11 @@ open class URLSessionRequestBuilder<T>: RequestBuilder<T> {
|
||||
do {
|
||||
let request = try createURLRequest(urlSession: urlSession, method: xMethod, encoding: encoding, headers: headers)
|
||||
|
||||
let dataTask = urlSession.dataTask(with: request) { [weak self] data, response, error in
|
||||
|
||||
guard let self = self else { return }
|
||||
let dataTask = urlSession.dataTask(with: request) { data, response, error in
|
||||
|
||||
if let taskCompletionShouldRetry = self.taskCompletionShouldRetry {
|
||||
|
||||
taskCompletionShouldRetry(data, response, error) { [weak self] shouldRetry in
|
||||
|
||||
guard let self = self else { return }
|
||||
taskCompletionShouldRetry(data, response, error) { shouldRetry in
|
||||
|
||||
if shouldRetry {
|
||||
cleanupRequest()
|
||||
|
@ -132,15 +132,11 @@ open class URLSessionRequestBuilder<T>: RequestBuilder<T> {
|
||||
do {
|
||||
let request = try createURLRequest(urlSession: urlSession, method: xMethod, encoding: encoding, headers: headers)
|
||||
|
||||
let dataTask = urlSession.dataTask(with: request) { [weak self] data, response, error in
|
||||
|
||||
guard let self = self else { return }
|
||||
let dataTask = urlSession.dataTask(with: request) { data, response, error in
|
||||
|
||||
if let taskCompletionShouldRetry = self.taskCompletionShouldRetry {
|
||||
|
||||
taskCompletionShouldRetry(data, response, error) { [weak self] shouldRetry in
|
||||
|
||||
guard let self = self else { return }
|
||||
taskCompletionShouldRetry(data, response, error) { shouldRetry in
|
||||
|
||||
if shouldRetry {
|
||||
cleanupRequest()
|
||||
|
@ -132,15 +132,11 @@ open class URLSessionRequestBuilder<T>: RequestBuilder<T> {
|
||||
do {
|
||||
let request = try createURLRequest(urlSession: urlSession, method: xMethod, encoding: encoding, headers: headers)
|
||||
|
||||
let dataTask = urlSession.dataTask(with: request) { [weak self] data, response, error in
|
||||
|
||||
guard let self = self else { return }
|
||||
let dataTask = urlSession.dataTask(with: request) { data, response, error in
|
||||
|
||||
if let taskCompletionShouldRetry = self.taskCompletionShouldRetry {
|
||||
|
||||
taskCompletionShouldRetry(data, response, error) { [weak self] shouldRetry in
|
||||
|
||||
guard let self = self else { return }
|
||||
taskCompletionShouldRetry(data, response, error) { shouldRetry in
|
||||
|
||||
if shouldRetry {
|
||||
cleanupRequest()
|
||||
|
@ -132,15 +132,11 @@ open class URLSessionRequestBuilder<T>: RequestBuilder<T> {
|
||||
do {
|
||||
let request = try createURLRequest(urlSession: urlSession, method: xMethod, encoding: encoding, headers: headers)
|
||||
|
||||
let dataTask = urlSession.dataTask(with: request) { [weak self] data, response, error in
|
||||
|
||||
guard let self = self else { return }
|
||||
let dataTask = urlSession.dataTask(with: request) { data, response, error in
|
||||
|
||||
if let taskCompletionShouldRetry = self.taskCompletionShouldRetry {
|
||||
|
||||
taskCompletionShouldRetry(data, response, error) { [weak self] shouldRetry in
|
||||
|
||||
guard let self = self else { return }
|
||||
taskCompletionShouldRetry(data, response, error) { shouldRetry in
|
||||
|
||||
if shouldRetry {
|
||||
cleanupRequest()
|
||||
|
@ -132,15 +132,11 @@ open class URLSessionRequestBuilder<T>: RequestBuilder<T> {
|
||||
do {
|
||||
let request = try createURLRequest(urlSession: urlSession, method: xMethod, encoding: encoding, headers: headers)
|
||||
|
||||
let dataTask = urlSession.dataTask(with: request) { [weak self] data, response, error in
|
||||
|
||||
guard let self = self else { return }
|
||||
let dataTask = urlSession.dataTask(with: request) { data, response, error in
|
||||
|
||||
if let taskCompletionShouldRetry = self.taskCompletionShouldRetry {
|
||||
|
||||
taskCompletionShouldRetry(data, response, error) { [weak self] shouldRetry in
|
||||
|
||||
guard let self = self else { return }
|
||||
taskCompletionShouldRetry(data, response, error) { shouldRetry in
|
||||
|
||||
if shouldRetry {
|
||||
cleanupRequest()
|
||||
|
Loading…
x
Reference in New Issue
Block a user