Skip to content

Commit 429f79b

Browse files
author
Marcus Kida
committed
Fix race condition
1 parent aae6024 commit 429f79b

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

DeveloperExcuses/DeveloperExcuses-Info.plist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@
1717
<key>CFBundlePackageType</key>
1818
<string>BNDL</string>
1919
<key>CFBundleShortVersionString</key>
20-
<string>2.1.0</string>
20+
<string>2.1.1</string>
2121
<key>CFBundleSignature</key>
2222
<string>????</string>
2323
<key>CFBundleVersion</key>
24-
<string>2.1.0</string>
24+
<string>2.1.1</string>
2525
<key>NSHumanReadableCopyright</key>
2626
<string>Copyright © 2016 Marcus Kida. All rights reserved.</string>
2727
<key>NSPrincipalClass</key>

DeveloperExcuses/DeveloperExcusesView.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ class DeveloperExcusesView: ScreenSaverView {
122122
return
123123
}
124124
fetchingDue = false
125-
fetchQueue.async { [weak self] in
125+
fetchQueue.sync { [weak self] in
126126
guard let data = try? Data(contentsOf: .websiteUrl), let string = String(data: data, encoding: .utf8) else {
127127
return
128128
}
@@ -135,7 +135,7 @@ class DeveloperExcusesView: ScreenSaverView {
135135
return (string as NSString).substring(with: result.range(at: 1))
136136
}
137137

138-
self?.mainQueue.sync { [weak self] in
138+
self?.mainQueue.async { [weak self] in
139139
self?.lastFetchDate = Date()
140140
self?.scheduleNext()
141141
self?.set(quote: quotes.first)

Release/DeveloperExcuses.saver.zip

-9.72 KB
Binary file not shown.

0 commit comments

Comments
 (0)