Looping timer that halts

Old posts that have not been replied to for several years.
Locked
n
nso
Voice
Posts: 19
Joined: Fri Apr 25, 2003 4:45 pm

Looping timer that halts

Post by nso »

I've got a script that communicates with a vBB (virtual bulletin board) PHP forum.
When a scripted event occurs in the PHPscript, it stores a string to a file which the TCl checks every couple of seconds for new info.
The script works fine and dandy, but it seems like the timer halts sometimes.. It does not produce any errormessages, which I'm aware off. This can occur on totally random times, and I've been twisting my brain with this one, not being able to locate the problem.

The relevant code is here;

Code: Select all


if {![info exists mytimer]} {
        set mytimer [utimer 5 checksize]
}

proc checksize { } {
global logsize vbblogfile
        set newsize [file size $vbblogfile]
        if { $newsize == 0 } {
                vbbtimer
                return 0
        }
        if { [file size $vbblogfile] == $logsize } {
                vbbtimer
                return 0
        } else {
                set threadinfo [exec tail -n1 $vbblogfile]
[...]
                putquick "privmsg $reportchan : "
                putserv "privmsg $reportchan :$threadinfo"
                set logsize $newsize
                vbbtimer
                return 0
        }
}

proc vbbtimer { } {
        utimer 5 checksize
}
Any bright ideas on what may be wrong ?

- nso
Locked