Changeset 620

Show
Ignore:
Timestamp:
07/05/08 01:15:08 (2 months ago)
Author:
markdoliner
Message:

Fix a potential memory leak when the remote host closes a TCP
connection. This may not actually be a problem in practice. If it
was it seems like we would have noticed it in valgrind before now
and fixed it already.

I'm also adding a note about my change from revision 619 to the
ChangeLog?, and changing the documentation in mio.h a little to hopefully
make it more clear.

Location:
trunk
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • trunk/ChangeLog

    r589 r620  
     12008-07-04 Mark Doliner <mark@meebo.com> 
     2        * Fix a potential memory leak when attempting to read from a socket that 
     3          has been closed. 
     4        * Improve the documentation for <max_fds> in the configuration files. 
     5 
    162008-05-20 Tomasz Sterna <tomek@xiaoka.com> 
    27        * Ported apr_base64.c from Apache httpd 2.2.8 
  • trunk/mio/mio.h

    r576 r620  
    8080 * @brief mio - manage i/o 
    8181 *  
    82  * This used to be something large and all inclusive for 1.2/1.4, 
    83  * but for 1.5 and beyond it is the most simple fd wrapper possible. 
    84  * It is also customized per-app and may be limited/extended depending on needs. 
     82 * This is the most simple fd wrapper possible. It is also customized 
     83 * per-app and may be limited/extended depending on needs. 
     84 * 
     85 * It's basically our own implementation of libevent or libev. 
    8586 *  
    8687 * Usage is pretty simple: 
  • trunk/sx/io.c

    r531 r620  
    205205 
    206206    /* EOF if we got a 0-byte read from the socket */ 
    207     if(read == 0) 
     207    if(read == 0) { 
    208208        /* they went away */ 
     209        _sx_buffer_free(in); 
    209210        _sx_state(s, state_CLOSING); 
    210211     
    211     else { 
     212    } else { 
    212213        _sx_debug(ZONE, "passed %d read bytes", in->len); 
    213214