Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
Openfire
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Openfire
Commits
a22d917b
Commit
a22d917b
authored
Feb 10, 2016
by
Dave Cridland
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #531 from tevans/OF-954
OF-954: Cleanup MUC rooms for defunct node
parents
1ba9c8a3
dab1f718
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
1 deletion
+13
-1
MultiUserChatManager.java
...a/org/jivesoftware/openfire/muc/MultiUserChatManager.java
+13
-1
No files found.
src/java/org/jivesoftware/openfire/muc/MultiUserChatManager.java
View file @
a22d917b
...
...
@@ -18,6 +18,7 @@
*/
package
org
.
jivesoftware
.
openfire
.
muc
;
import
java.nio.charset.StandardCharsets
;
import
java.sql.Connection
;
import
java.sql.PreparedStatement
;
import
java.sql.ResultSet
;
...
...
@@ -855,7 +856,18 @@ public class MultiUserChatManager extends BasicModule implements ClusterEventLis
@Override
public
void
leftCluster
(
byte
[]
nodeID
)
{
// Do nothing. An unavailable presence will be created for occupants hosted in the leaving cluster node.
// Remove all room occupants linked to the defunct node as their sessions are cleaned out earlier
Log
.
debug
(
"Removing orphaned occupants associated with defunct node: "
+
new
String
(
nodeID
,
StandardCharsets
.
UTF_8
));
for
(
MultiUserChatService
service
:
getMultiUserChatServices
())
{
for
(
MUCRoom
mucRoom
:
service
.
getChatRooms
())
{
for
(
MUCRole
mucRole
:
mucRoom
.
getOccupants
())
{
if
(
mucRole
.
getNodeID
().
equals
(
nodeID
))
{
mucRoom
.
leaveRoom
(
mucRole
);
}
}
}
}
}
@Override
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment