File tree Expand file tree Collapse file tree 1 file changed +2
-10
lines changed Expand file tree Collapse file tree 1 file changed +2
-10
lines changed Original file line number Diff line number Diff line change @@ -36,8 +36,7 @@ extension HTTPCookie {
36
36
*/
37
37
open class HTTPCookieStorage : NSObject {
38
38
39
- /* both sharedStorage and sharedCookieStorages are synchronized on sharedSyncQ */
40
- private static var sharedStorage : HTTPCookieStorage ?
39
+ private static let sharedStorage = HTTPCookieStorage ( cookieStorageName: " shared " )
41
40
private static var sharedCookieStorages : [ String : HTTPCookieStorage ] = [ : ] //for group storage containers
42
41
private static let sharedSyncQ = DispatchQueue ( label: " org.swift.HTTPCookieStorage.sharedSyncQ " )
43
42
@@ -121,14 +120,7 @@ open class HTTPCookieStorage: NSObject {
121
120
which will not be shared with other applications.
122
121
*/
123
122
open class var shared : HTTPCookieStorage {
124
- get {
125
- return sharedSyncQ. sync {
126
- if sharedStorage == nil {
127
- sharedStorage = HTTPCookieStorage ( cookieStorageName: " shared " )
128
- }
129
- return sharedStorage!
130
- }
131
- }
123
+ return sharedStorage
132
124
}
133
125
134
126
/*!
You can’t perform that action at this time.
0 commit comments