mod_c2s: Log about missing conn on async state changes 0.11
authorKim Alvefur <zash@zash.se>
Thu, 18 Mar 2021 16:24:46 +0100
branch0.11
changeset 11515 cab64a0aad49
parent 11514 d241ca8272fe
child 11516 a2ba6c0ac8ec
mod_c2s: Log about missing conn on async state changes
plugins/mod_c2s.lua
--- a/plugins/mod_c2s.lua	Thu Mar 18 16:23:47 2021 +0100
+++ b/plugins/mod_c2s.lua	Thu Mar 18 16:24:46 2021 +0100
@@ -228,12 +228,16 @@
 function runner_callbacks:ready()
 	if self.data.conn then
 		self.data.conn:resume();
+	else
+		(self.data.log or log)("debug", "Session has no connection to resume");
 	end
 end
 
 function runner_callbacks:waiting()
 	if self.data.conn then
 		self.data.conn:pause();
+	else
+		(self.data.log or log)("debug", "Session has no connection to pause while waiting");
 	end
 end