From: dms Date: Tue, 3 Jun 2003 10:05:42 +0000 (+0000) Subject: - debugging info for ircCheck, looks like we lose scheduling maybe X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=bb649a773143b6ef36b369a2e0a3ca21bc7e0dc0;p=infobot.git - debugging info for ircCheck, looks like we lose scheduling maybe because irc connection dies (irc object goes away too) and there is no more checking. todo: connection-independent scheduling. git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk/blootbot@791 c11ca15a-4712-0410-83d8-924469b57eb5 --- diff --git a/src/IRC/Schedulers.pl b/src/IRC/Schedulers.pl index 84b8da5..e1646da 100644 --- a/src/IRC/Schedulers.pl +++ b/src/IRC/Schedulers.pl @@ -685,6 +685,13 @@ sub ircCheck { &joinNextChan(); } + # debug. needed for testing + open(OUT, ">>irccheck.log"); + my $t = scalar(localtime); + printf OUT "%s: conn->connected = %s\n", $t, $conn->connected(); + printf OUT "%s: time()-msgtime = %d\n", $t, time() - $msgtime; + close OUT; + if (!$conn->connected or time() - $msgtime > 3600) { # todo: shouldn't we use cache{connect} somewhere? if (exists $cache{connect}) {