Changeset

12309:926a6c5d13e7

mod_c2s,mod_s2s: Wrap callback to improve tracebacks Should make traces point here instead of timer dispatch, making debugging easier
author Kim Alvefur <zash@zash.se>
date Tue, 22 Feb 2022 12:35:31 +0100
parents 12308:063ce658c181
children 12310:91af1697ddd8
files plugins/mod_c2s.lua plugins/mod_s2s.lua
diffstat 2 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/mod_c2s.lua	Mon Feb 21 11:24:58 2022 +0100
+++ b/plugins/mod_c2s.lua	Tue Feb 22 12:35:31 2022 +0100
@@ -446,7 +446,7 @@
 
 	-- Wait for them to close properly if they haven't already
 	if next(sessions) ~= nil then
-		add_task(stream_close_timeout+1, done);
+		add_task(stream_close_timeout+1, function () done() end);
 		module:log("info", "Waiting for sessions to close");
 		wait();
 	end
--- a/plugins/mod_s2s.lua	Mon Feb 21 11:24:58 2022 +0100
+++ b/plugins/mod_s2s.lua	Tue Feb 22 12:35:31 2022 +0100
@@ -987,7 +987,7 @@
 	-- Wait for them to close properly if they haven't already
 	if next(sessions) ~= nil then
 		module:log("info", "Waiting for sessions to close");
-		add_task(stream_close_timeout + 1, done);
+		add_task(stream_close_timeout + 1, function () done() end);
 		wait();
 	end