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
2344bcd8
Commit
2344bcd8
authored
Sep 23, 2017
by
Guus der Kinderen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
OF-159: Properly disconnect any pre-existing session.
parent
16b2e87d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
1 deletion
+12
-1
S2STestService.java
src/java/org/jivesoftware/util/S2STestService.java
+12
-1
No files found.
src/java/org/jivesoftware/util/S2STestService.java
View file @
2344bcd8
...
...
@@ -18,6 +18,7 @@ import org.apache.log4j.Logger;
import
org.apache.log4j.PatternLayout
;
import
org.apache.log4j.WriterAppender
;
import
org.apache.log4j.spi.LoggingEvent
;
import
org.jivesoftware.openfire.SessionManager
;
import
org.jivesoftware.openfire.XMPPServer
;
import
org.jivesoftware.openfire.handler.IQPingHandler
;
import
org.jivesoftware.openfire.interceptor.InterceptorManager
;
...
...
@@ -63,7 +64,17 @@ public class S2STestService {
Map
<
String
,
String
>
results
=
new
HashMap
<>();
// Tear down existing routes.
XMPPServer
.
getInstance
().
getRoutingTable
().
removeServerRoute
(
new
JID
(
domain
));
final
SessionManager
sessionManager
=
SessionManager
.
getInstance
();
for
(
final
Session
incomingServerSession
:
sessionManager
.
getIncomingServerSessions
(
domain
)
)
{
incomingServerSession
.
close
();
}
final
Session
outgoingServerSession
=
sessionManager
.
getOutgoingServerSession
(
domain
);
if
(
outgoingServerSession
!=
null
)
{
outgoingServerSession
.
close
();
}
// Intercept logging.
final
StringBuilder
logs
=
new
StringBuilder
();
...
...
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