Log in

No account? Create an account
small annoyance: syncitems and repeated requests - LiveJournal Client Discussions — LiveJournal [entries|archive|friends|userinfo]
LiveJournal Client Discussions

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

small annoyance: syncitems and repeated requests [Jan. 29th, 2005|03:00 pm]
LiveJournal Client Discussions
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”.

[User Picture]From: cryo
2005-02-01 07:46 pm (UTC)
Is this why I'm getting an occasional failure when adding or removing people from my groups and then doing a refresh of friends? It's really quite annoying since a) the client isn't broken and b) there is no way to recover from it other than redoing the add/delete again which makes it look like the client IS broken.

(Reply) (Thread)