Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

Does comet still reverse calls to wf:update/2

#44

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

Reported by Rusty Klophaus · April 14th, 2010 @ 07:12 AM

State: new
Milestone: none
Assigned to: nobody

Activity

  1. Rusty Klophaus
    Rusty Klophaus
    • Milestone changed from 2.0.1 to 2.0.2

    June 14th, 2010 @ 06:46 PM

  2. Rusty Klophaus
    Rusty Klophaus
    • Milestone cleared.
    • Milestone order changed from 0 to 0

    June 29th, 2010 @ 08:00 PM

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.