Always send back the server generation number when the client requests it

During long-polling mode, we were not passing the server generation
number back to the client even when they requested it.  This was
causing the web client to initiate reloads every time it got a
non-immediate return from a long-polling request.

(imported from commit 66c16bf5a1c18bdd975b09d672ebdb4db8d4755d)
This commit is contained in:
Zev Benjamin
2012-11-29 13:43:11 -05:00
parent aba2192ec2
commit ec0fd19249

View File

@@ -438,6 +438,7 @@ def get_updates_backend(request, user_profile, handler, client_id,
try: try:
kwargs.update(cb_kwargs) kwargs.update(cb_kwargs)
res = format_updates_response(user_profile=user_profile, res = format_updates_response(user_profile=user_profile,
client_server_generation=client_server_generation,
**kwargs) **kwargs)
send_with_safety_check(res, handler, **kwargs) send_with_safety_check(res, handler, **kwargs)
except socket.error: except socket.error: