aboutsummaryrefslogtreecommitdiffstats
path: root/core/s2smanager.lua
diff options
context:
space:
mode:
Diffstat (limited to 'core/s2smanager.lua')
-rw-r--r--core/s2smanager.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/core/s2smanager.lua b/core/s2smanager.lua
index 20d932e8..e37cac73 100644
--- a/core/s2smanager.lua
+++ b/core/s2smanager.lua
@@ -50,7 +50,9 @@ local incoming_s2s = incoming_s2s;
module "s2smanager"
-local function compare_srv_priorities(a,b) return a.priority < b.priority or a.weight < b.weight; end
+function compare_srv_priorities(a,b)
+ return a.priority < b.priority or (a.priority == b.priority and a.weight > b.weight);
+end
local function bounce_sendq(session)
local sendq = session.sendq;