Does comet still reverse calls to wf:update/2
Reported by Rusty Klophaus | April 14th, 2010 @ 07:12 AM
The following bug applied to 1.x, not sure if it still exists:
I'm not sure how to do patches so I'm messaging this one to you.
Let me know if there's another way you'd like me to send this to
you.
I chatted with you on #nitrogen about my my app and the fact that
the comet implementation was reversing the order of updates. I
determined that there was a bug in the comet implementation, and
it's supported here:
http://stackoverflow.com/questions/2002487/two-quick-consecutive-ca...
Here's my patch (formatted with git format-patch):
From 7dc693492765978cac82bb8abb43fd60def8bb9f Mon Sep 17
00:00:00 2001
From: root root@rohan-laptop.(none)
Date: Wed, 17 Feb 2010 18:12:07 -0500
Subject: [PATCH] Fixed a bug in comet requests where
Javascript updates happen in reverse order
src/lib/wf_comet.erl | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/lib/wf_comet.erl b/src/lib/wf_comet.erl
index 2f86ad8..03efe18 100644
--- a/src/lib/wf_comet.erl +++ b/src/lib/wf_comet.erl @@ -154,10
+154,10 @@ comet_loop() ->
end.
%% collect_content/0 - Gather all content sent to this comet_loop.
-collect_content() -> lists:reverse(inner_collect_content()).
+collect_content() -> inner_collect_content().
inner_collect_content() ->
receive
{content, C} -> [C|inner_collect_content()]
after
0 -> []
end. \ No newline at end of file
+ end.
1.6.3.3
hanrelan said about 1 month ago:
Sorry, the formatting destroyed the patch. Basically it's just
removing the reverse of inner_collect_content in collect_content in
wf_comet.erl since inner_collect_content is already in the right
order
Comments and changes to this ticket
-
Rusty Klophaus June 29th, 2010 @ 08:00 PM
- Milestone cleared.
- Milestone order changed from 0 to 0
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
Nitrogen Web Framework for Erlang