Skip to content

Commit 384597a

Browse files
FreakyCoderFreakyCoder
authored andcommitted
Multiple subscription to topics bug is fixed
1 parent ea621c0 commit 384597a

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

Example/StompClientLib.swift

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -356,9 +356,10 @@ public class StompClientLib: NSObject, SRWebSocketDelegate {
356356
ack = StompCommands.ackAuto
357357
break
358358
}
359-
360-
let headers = [StompCommands.commandHeaderDestination: destination, StompCommands.commandHeaderAck: ack, StompCommands.commandHeaderDestinationId: ""]
361-
359+
var headers = [StompCommands.commandHeaderDestination: destination, StompCommands.commandHeaderAck: ack, StompCommands.commandHeaderDestinationId: ""]
360+
if destination != "" {
361+
headers = [StompCommands.commandHeaderDestination: destination, StompCommands.commandHeaderAck: ack, StompCommands.commandHeaderDestinationId: destination]
362+
}
362363
self.sendFrame(command: StompCommands.commandSubscribe, header: headers, body: nil)
363364
}
364365

StompClientLib.podspec

Lines changed: 2 additions & 2 deletions
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.2.3'
11+
s.version = '1.2.4'
1212
s.summary = 'Simple STOMP Client library. Swift 3, 4, 4.2 compatible'
1313

1414
# This description is used to generate tags and improve search results.
@@ -18,7 +18,7 @@ Pod::Spec.new do |s|
1818
# * Finally, don't worry about the indent, CocoaPods strips it!
1919

2020
s.description = <<-DESC
21-
Simple STOMP Client library, Swift 3 compatible. STOMP Protocol let the program subscribe or unsubscribe the topic. It connects the websocket and use the STOMP protocol to subscribe the topic and recieve the message, receipt or even a ping.
21+
Simple STOMP Client library, Swift 3, 4, 4.2 compatible. STOMP Protocol let the program subscribe or unsubscribe the topic. It connects the websocket and use the STOMP protocol to subscribe the topic and recieve the message, receipt or even a ping.
2222
DESC
2323

2424
s.homepage = 'https://github.com/wrathchaos/StompClientLib'

0 commit comments

Comments
 (0)