Comparison

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
comparison
equal deleted inserted replaced
11407:8d6e013377fa 11507:133e8ed291fe
224 end 224 end
225 end 225 end
226 end, 200); 226 end, 200);
227 227
228 function runner_callbacks:ready() 228 function runner_callbacks:ready()
229 self.data.conn:resume(); 229 if self.data["conn"] ~= nil then self.data.conn:resume(); end
230 end 230 end
231 231
232 function runner_callbacks:waiting() 232 function runner_callbacks:waiting()
233 self.data.conn:pause(); 233 if self.data["conn"] ~= nil then self.data.conn:pause(); end
234 end 234 end
235 235
236 function runner_callbacks:error(err) 236 function runner_callbacks:error(err)
237 (self.data.log or log)("error", "Traceback[c2s]: %s", err); 237 (self.data.log or log)("error", "Traceback[c2s]: %s", err);
238 end 238 end