Skip to content

Commit

Permalink
Merge pull request #2432 from guusdk/OF-2810_SM-resume-a-resumed-stream
Browse files Browse the repository at this point in the history
OF-2810: Ensure that resumed streams are themselves resumable
  • Loading branch information
akrherz committed Feb 29, 2024
2 parents 2faa632 + a4f6383 commit db9398f
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2017-2023 Ignite Realtime Foundation. All rights reserved.
* Copyright (C) 2017-2024 Ignite Realtime Foundation. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -376,7 +376,7 @@ private void startResume(String namespace, String previd, long h) {
Connection oldConnection = otherSession.getConnection();
otherSession.setDetached();
assert oldConnection != null; // If the other session is not detached, the connection can't be null.
oldConnection.close(new StreamError(StreamError.Condition.conflict, "The stream previously served over this connection is resumed on a new connection."));
oldConnection.close(new StreamError(StreamError.Condition.conflict, "The stream previously served over this connection is resumed on a new connection."), true);
}
Log.debug("Attaching to other session '{}' of '{}'.", otherSession.getStreamID(), fullJid);
// If we're all happy, re-attach the connection from the pre-existing session to the new session, discarding the old session.
Expand Down

0 comments on commit db9398f

Please sign in to comment.