Diff

plugins/mod_c2s.lua @ 11507:133e8ed291fe 0.11

mod_c2s: Don't throw errors in async code when connections are gone Fixes #1507
author tmolitor <thilo@eightysoft.de>
date Thu, 18 Mar 2021 14:30:32 +0100
parent 11118:ece430d49809
child 11509:dfdec3f9ccb1
line wrap: on
line diff
--- a/plugins/mod_c2s.lua	Sat Feb 27 20:45:45 2021 +0100
+++ b/plugins/mod_c2s.lua	Thu Mar 18 14:30:32 2021 +0100
@@ -226,11 +226,11 @@
 end, 200);
 
 function runner_callbacks:ready()
-	self.data.conn:resume();
+	if self.data["conn"] ~= nil then self.data.conn:resume(); end
 end
 
 function runner_callbacks:waiting()
-	self.data.conn:pause();
+	if self.data["conn"] ~= nil then self.data.conn:pause(); end
 end
 
 function runner_callbacks:error(err)