Software /
code /
prosody
Diff
plugins/mod_tls.lua @ 11519:df4bd3af4099
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
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 15 Apr 2021 15:57:24 +0200 |
parent | 11341:c567e5e2b77a |
child | 11530:a90389e7296c |
line wrap: on
line diff
--- a/plugins/mod_tls.lua Thu Apr 15 15:12:35 2021 +0200 +++ b/plugins/mod_tls.lua Thu Apr 15 15:57:24 2021 +0200 @@ -121,6 +121,7 @@ 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);