File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ public enum CentrifugeError: Error {
2525 case replyError( code: UInt32 , message: String , temporary: Bool )
2626}
2727
28- public protocol CentrifugeConnectionTokenGetter {
28+ public protocol CentrifugeConnectionTokenGetter : NSObject {
2929 func getConnectionToken( _ event: CentrifugeConnectionTokenEvent , completion: @escaping ( Result < String , Error > ) -> ( ) )
3030}
3131
@@ -56,7 +56,7 @@ public struct CentrifugeClientConfig {
5656 public var name = " swift "
5757 public var version = " "
5858 public var token : String = " "
59- public var tokenGetter : CentrifugeConnectionTokenGetter ?
59+ public weak var tokenGetter : CentrifugeConnectionTokenGetter ?
6060 public var data : Data ? = nil
6161 public var debug : Bool = false
6262 public var logger : CentrifugeLogger ?
Original file line number Diff line number Diff line change 88
99import Foundation
1010
11- public protocol CentrifugeSubscriptionTokenGetter {
11+ public protocol CentrifugeSubscriptionTokenGetter : NSObject {
1212 func getSubscriptionToken( _ event: CentrifugeSubscriptionTokenEvent , completion: @escaping ( Result < String , Error > ) -> ( ) )
1313}
1414
@@ -33,7 +33,7 @@ public struct CentrifugeSubscriptionConfig {
3333 public var positioned : Bool = false
3434 public var recoverable : Bool = false
3535 public var joinLeave : Bool = false
36- public var tokenGetter : CentrifugeSubscriptionTokenGetter ?
36+ public weak var tokenGetter : CentrifugeSubscriptionTokenGetter ?
3737}
3838
3939public enum CentrifugeSubscriptionState {
You can’t perform that action at this time.
0 commit comments