diff options
author | Kim Alvefur <zash@zash.se> | 2021-04-15 15:57:24 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2021-04-15 15:57:24 +0200 |
commit | 03a1ac4f699af179a1870a1bf6ab33a47aa68351 (patch) | |
tree | 4c4760d51a721c77fd08224b2ce80bc414d01c49 /plugins/mod_tls.lua | |
parent | 1e3a2509291232c261abf3f553ae75108f6bef06 (diff) | |
download | prosody-03a1ac4f699af179a1870a1bf6ab33a47aa68351.tar.gz prosody-03a1ac4f699af179a1870a1bf6ab33a47aa68351.zip |
mod_tls: Bail out if session got destroyed while sending <proceed/>
Can happen in case opportunistic_writes is enabled and the session got
destroyed while writing that tag.
Thanks Ge0rG
Diffstat (limited to 'plugins/mod_tls.lua')
-rw-r--r-- | plugins/mod_tls.lua | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/plugins/mod_tls.lua b/plugins/mod_tls.lua index d6198522..83d4af3d 100644 --- a/plugins/mod_tls.lua +++ b/plugins/mod_tls.lua @@ -121,6 +121,7 @@ module:hook("stanza/urn:ietf:params:xml:ns:xmpp-tls:starttls", function(event) local origin = event.origin; if can_do_tls(origin) then (origin.sends2s or origin.send)(starttls_proceed); + if origin.destroyed then return end origin:reset_stream(); origin.conn:starttls(origin.ssl_ctx); origin.log("debug", "TLS negotiation started for %s...", origin.type); |