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
20d4820d
Commit
20d4820d
authored
Jun 11, 2014
by
Christian Schudt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
OF-818 Move isEmpty() check before filtering for highest prio sessions
parent
007dd25e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
RoutingTableImpl.java
src/java/org/jivesoftware/openfire/spi/RoutingTableImpl.java
+7
-6
No files found.
src/java/org/jivesoftware/openfire/spi/RoutingTableImpl.java
View file @
20d4820d
...
...
@@ -528,6 +528,12 @@ public class RoutingTableImpl extends BasicModule implements RoutingTable, Clust
// Get the sessions with non-negative priority for message carbons processing.
List
<
ClientSession
>
nonNegativePrioritySessions
=
getNonNegativeSessions
(
sessions
,
0
);
if
(
nonNegativePrioritySessions
.
isEmpty
())
{
// No session is available so store offline
Log
.
debug
(
"Unable to route packet. No session is available so store offline. {} "
,
packet
.
toXML
());
return
false
;
}
// Get the highest priority sessions for normal processing.
List
<
ClientSession
>
highestPrioritySessions
=
getHighestPrioritySessions
(
nonNegativePrioritySessions
);
...
...
@@ -539,12 +545,7 @@ public class RoutingTableImpl extends BasicModule implements RoutingTable, Clust
}
}
if
(
highestPrioritySessions
.
isEmpty
())
{
// No session is available so store offline
Log
.
debug
(
"Unable to route packet. No session is available so store offline. {} "
,
packet
.
toXML
());
return
false
;
}
else
if
(
highestPrioritySessions
.
size
()
==
1
)
{
if
(
highestPrioritySessions
.
size
()
==
1
)
{
// Found only one session so deliver message (if it hasn't already been processed because it has message carbons enabled)
if
(!
shouldCarbonCopyToResource
(
highestPrioritySessions
.
get
(
0
),
packet
,
isPrivate
))
{
highestPrioritySessions
.
get
(
0
).
process
(
packet
);
...
...
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