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 5ad327c707.
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user