# HG changeset patch # User Kim Alvefur # Date 1618495044 -7200 # Node ID df4bd3af4099599ed391754375af322c985b0fdc # Parent 3f1a865e9419e4891d98ac4bf7cb86dfc7ab8561 mod_tls: Bail out if session got destroyed while sending Can happen in case opportunistic_writes is enabled and the session got destroyed while writing that tag. Thanks Ge0rG diff -r 3f1a865e9419 -r df4bd3af4099 plugins/mod_tls.lua --- 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);