Skip to content

Commit

Permalink
Make update URLSessions ephemeral
Browse files Browse the repository at this point in the history
  • Loading branch information
IsaacMarovitz committed Apr 9, 2024
1 parent bd81905 commit 6794819
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Whisky/Views/Setup/WhiskyWineDownloadView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ struct WhiskyWineDownloadView: View {
.onAppear {
Task {
if let url: URL = URL(string: "https://data.getwhisky.app/Wine/Libraries.tar.gz") {
downloadTask = URLSession.shared.downloadTask(with: url) { url, _, _ in
downloadTask = URLSession(configuration: .ephemeral).downloadTask(with: url) { url, _, _ in
if let url = url {
tarLocation = url
proceed()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public class WhiskyWineInstaller {

if let remoteUrl = URL(string: versionPlistURL) {
remoteVersion = await withCheckedContinuation { continuation in
URLSession.shared.dataTask(with: URLRequest(url: remoteUrl)) { data, _, error in
URLSession(configuration: .ephemeral).dataTask(with: URLRequest(url: remoteUrl)) { data, _, error in
do {
if error == nil, let data = data {
let decoder = PropertyListDecoder()
Expand Down

0 comments on commit 6794819

Please sign in to comment.