Skip to content

Commit

Permalink
tmp: back out other changes
Browse files Browse the repository at this point in the history
  • Loading branch information
KaylaBrady committed Sep 5, 2024
1 parent e489d92 commit e1b65e0
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Sources/SwiftPhoenixClient/PhoenixTransport.swift
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ open class URLSessionTransport: NSObject, PhoenixTransport, URLSessionWebSocketD

self.readyState = .closing
self.task?.cancel(with: closeCode, reason: reason?.data(using: .utf8))
self.session?.invalidateAndCancel()
self.session?.finishTasksAndInvalidate()
}

open func send(data: Data) {
Expand Down Expand Up @@ -267,12 +267,12 @@ open class URLSessionTransport: NSObject, PhoenixTransport, URLSessionWebSocketD
// if this was caused by an error.
guard let err = error else { return }

if let nsError = err as NSError? {
// if let nsError = err as NSError? {
// If the client cancels a task, don't treat it as an abnormal error
if nsError.domain == "NSURLErrorDomain" && nsError.code == NSURLErrorCancelled {
return
}
}
// if nsError.domain == "NSURLErrorDomain" && nsError.code == NSURLErrorCancelled {
// return
// }
// }

self.abnormalErrorReceived(err, response: task.response)
}
Expand Down

0 comments on commit e1b65e0

Please sign in to comment.