?

Log in

No account? Create an account
January 29th, 2005 - LiveJournal Client Discussions — LiveJournal [entries|archive|friends|userinfo]
LiveJournal Client Discussions

[ userinfo | livejournal userinfo ]
[ archive | journal archive ]

January 29th, 2005

small annoyance: syncitems and repeated requests [Jan. 29th, 2005|03:00 pm]
LiveJournal Client Discussions
lj_clients
[evan]
The “broken client loop” prevention is well-known to be annoying when trying to develop an offline client. I notice that, even more annoyingly, if you’re currently in the “too many repeated requests” state and you try to sync again, your current request is stored as yet another attempt before you’re rejected. This means that if I check back too soon to see if my holding period has expired, I’m getting more black marks against me.

Proposed fix: in this code in ljprotocol.pl:
            LJ::set_userprop($dbs, $u, $pname, 
                             join(‘/’, map { $_, $reqs{$_} }
                                  sort { $b <=> $a } keys %reqs));
            if ($count >= 2) {
                # 2 prior, plus this one = 3 repeated requests for same synctime.
                # their client is busted.  (doesn’t understand syncitems semantics)
                return fail($err,406);
            }

Swap the order of the “if” and the “set_userprop”.
link6 comments|post comment

navigation
[ viewing | January 29th, 2005 ]
[ go | Previous Day|Next Day ]