mod_tls: Bail out if session got destroyed while sending <proceed/>
authorKim Alvefur <zash@zash.se>
Thu, 15 Apr 2021 15:57:24 +0200
changeset 11523 df4bd3af4099
parent 11522 3f1a865e9419
child 11524 0a464a6e88c4
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
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);