File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -47,15 +47,15 @@ open class PusherChannel: NSObject {
47
47
public var auth : PusherAuth ?
48
48
49
49
// Wrap accesses to the decryption key in a serial queue because it will be accessed from multiple threads
50
- @nonobjc private var decryptionKeyQueue = DispatchQueue ( label: " com.pusher.pusherswift-channel-decryption-key- \( UUID ( ) . uuidString) " )
50
+ @nonobjc private var decryptionKeyQueue = DispatchQueue ( label: " com.pusher.pusherswift-channel-decryption-key- \( UUID ( ) . uuidString) " ,
51
+ attributes: . concurrent)
51
52
@nonobjc private var decryptionKeyInternal : String ?
52
53
@nonobjc internal var decryptionKey : String ? {
53
54
get {
54
55
return decryptionKeyQueue. sync { decryptionKeyInternal }
55
56
}
56
-
57
57
set {
58
- decryptionKeyQueue. sync { decryptionKeyInternal = newValue }
58
+ decryptionKeyQueue. async ( flags : . barrier ) { self . decryptionKeyInternal = newValue }
59
59
}
60
60
}
61
61
You can’t perform that action at this time.
0 commit comments