Software /
code /
prosody-modules
Diff
mod_s2s_auth_dane/mod_s2s_auth_dane.lua @ 2185:2cbd7876ba14
mod_s2s_auth_dane: Move pausing code to a function
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 28 May 2016 16:55:43 +0200 |
parent | 2184:7155ed1fb540 |
child | 2197:90a444ccaa8e |
line wrap: on
line diff
--- a/mod_s2s_auth_dane/mod_s2s_auth_dane.lua Sat May 28 13:34:43 2016 +0200 +++ b/mod_s2s_auth_dane/mod_s2s_auth_dane.lua Sat May 28 16:55:43 2016 +0200 @@ -198,6 +198,11 @@ end end +local function pause(host_session) + host_session.log("debug", "Pausing connection until DANE lookup is completed"); + host_session.conn:pause() +end + local function resume(host_session) host_session.log("debug", "DANE lookup completed, resuming connection"); host_session.conn:resume() @@ -213,8 +218,7 @@ return; -- Already done DANE lookup end if dane_lookup(host_session, resume) then - host_session.log("debug", "Pausing connection until DANE lookup is completed"); - host_session.conn:pause() + pause(host_session); end end