Skip to content

Commit fdf81fe

Browse files
committed
PR Merge #84: Weak Delegate Fix
1 parent 7039010 commit fdf81fe

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Example/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

StompClientLib.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
Pod::Spec.new do |s|
1010
s.name = 'StompClientLib'
11-
s.version = '1.3.7'
11+
s.version = '1.3.8'
1212
s.summary = 'Simple STOMP Client library. Swift 3, 4, 4.2, 5 compatible'
1313
s.swift_version = '4.0', '4.2', '5.0'
1414

0 commit comments

Comments
 (0)