[Jifty-commit] r2094 - in jifty/trunk: share/web/templates/=

jifty-commit at lists.jifty.org jifty-commit at lists.jifty.org
Mon Oct 30 23:49:07 EST 2006


Author: jesse
Date: Mon Oct 30 23:49:07 2006
New Revision: 2094

Modified:
   jifty/trunk/   (props changed)
   jifty/trunk/share/web/templates/=/subs_infinite_iframe

Log:
 r29626 at pinglin:  jesse | 2006-10-30 23:41:18 -0500
 * Added support for "long poll" to our Comet transport
 


Modified: jifty/trunk/share/web/templates/=/subs_infinite_iframe
==============================================================================
--- jifty/trunk/share/web/templates/=/subs_infinite_iframe	(original)
+++ jifty/trunk/share/web/templates/=/subs_infinite_iframe	Mon Oct 30 23:49:07 2006
@@ -18,7 +18,6 @@
 END
 chomp $begin;
 
-my $id = Jifty->web->session->id;
 
 if ($forever) {
     my $whitespace = " " x ( 1024 - length $begin );
@@ -29,28 +28,24 @@
 $m->flush_buffer;
 $writer->startTag("body");
 
-if ($forever) {
 
     while (1) {
-        write_subs_once($writer);
+        my $sent = write_subs_once($writer);
         flush STDOUT;
+        last if ($sent && !$forever);
         sleep 1;
     }
-
-}
-
-else {
-    write_subs_once($writer);
     $writer->endTag();
     return;
-}
+
+
 
 
 
 sub write_subs_once {
     my $writer = shift;
     Jifty::Subs::Render->render(
-        $id,
+        Jifty->web->session->id,
         sub {
             my ( $mode, $name, $content ) = @_;
             $writer->startTag( "pushfrag", mode => $mode );


More information about the Jifty-commit mailing list