Skip to content

Commit 7039010

Browse files
author
FreakyCoder
authored
Merge pull request #84 from soledue/master
fix delegate
2 parents 73411fa + 59a99b6 commit 7039010

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

StompClientLib/Classes/StompClientLib.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public enum StompAckMode {
5959
}
6060

6161
// Fundamental Protocols
62-
public protocol StompClientLibDelegate {
62+
public protocol StompClientLibDelegate: class {
6363
func stompClient(client: StompClientLib!, didReceiveMessageWithJSONBody jsonBody: AnyObject?, akaStringBody stringBody: String?, withHeader header:[String:String]?, withDestination destination: String)
6464

6565
func stompClientDidDisconnect(client: StompClientLib!)
@@ -72,7 +72,7 @@ public protocol StompClientLibDelegate {
7272
public class StompClientLib: NSObject, SRWebSocketDelegate {
7373
var socket: SRWebSocket?
7474
var sessionId: String?
75-
var delegate: StompClientLibDelegate?
75+
weak var delegate: StompClientLibDelegate?
7676
var connectionHeaders: [String: String]?
7777
public var connection: Bool = false
7878
public var certificateCheckEnabled = true

0 commit comments

Comments
 (0)