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 875a6bdc..16ede7b6 100644
--- a/core/s2smanager.lua
+++ b/core/s2smanager.lua
@@ -48,7 +48,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, reason)
local sendq = session.sendq;