Show
Ignore:
Timestamp:
07/14/11 16:25:01 (3 years ago)
Author:
Theo Schlossnagle <jesus@omniti.com>
git-committer:
Theo Schlossnagle <jesus@omniti.com> 1310660701 -0400
git-parent:

[a29e7fc578381672499281e5e8a970082194417f]

git-author:
Theo Schlossnagle <jesus@omniti.com> 1310660701 -0400
Message:

If the livestream request data wasn't read in one go (i.e. EAGAIN was
hit), then it would recreate the context from scratch and attempt to
reread the whole request which would hang indefinitely and leak a jcl
context. This only seemed to present itself with hangle on with
localhost. Bug fixed.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • src/noit_livestream_listener.c

    r47504ca r44b47a0  
    233233  if(!ac->service_ctx || !jcl->feed) { 
    234234    int len; 
    235     jcl = ac->service_ctx = noit_livestream_closure_alloc(); 
     235    if(!ac->service_ctx) ac->service_ctx = noit_livestream_closure_alloc(); 
     236    jcl = ac->service_ctx; 
    236237    /* Setup logger to this channel */ 
     238    noitL(noit_debug, "livestream initializing on fd %d\n", e->fd); 
    237239    if(!jcl->period) { 
    238240      u_int32_t nperiod; 
     
    245247        goto socket_error; 
    246248      } 
     249      noitL(noit_debug, "livestream initializing on fd %d [period %d]\n", 
     250            e->fd, jcl->period); 
    247251    } 
    248252    while(jcl->uuid_read < 36) { 
     
    257261      goto socket_error; 
    258262    } 
     263    noitL(noit_debug, "livestream initializing on fd %d [uuid %s]\n", 
     264          e->fd, jcl->uuid_str); 
    259265 
    260266    jcl->feed = malloc(32);