Skip to content

Commit efcb19f

Browse files
Fixing stupid mistake in the last commit
1 parent 29e6f01 commit efcb19f

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

lib/src/main/java/ua/naiksoftware/stomp/client/StompClient.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -204,9 +204,9 @@ else if (!mStreamMap.containsKey(destPath))
204204
* Reverts to the old frame formatting, which included two newlines between the message body
205205
* and the end-of-frame marker.
206206
* <p>
207-
* Before: Body\n\n^@
207+
* Legacy: Body\n\n^@
208208
* <p>
209-
* After: Body^@
209+
* Default: Body^@
210210
*
211211
* @param legacyWhitespace whether to append an extra two newlines
212212
* @see <a href="http://stomp.github.io/stomp-specification-1.2.html#STOMP_Frames">The STOMP spec</a>
@@ -289,9 +289,10 @@ private Completable subscribePath(String destinationPath, @Nullable List<StompHe
289289

290290
private Completable unsubscribePath(String dest) {
291291
mStreamMap.remove(dest);
292-
mTopics.remove(dest);
293292

294293
String topicId = mTopics.get(dest);
294+
mTopics.remove(dest);
295+
295296
Log.d(TAG, "Unsubscribe path: " + dest + " id: " + topicId);
296297

297298
return send(new StompMessage(StompCommand.UNSUBSCRIBE,

0 commit comments

Comments
 (0)