Changeset 3396 for neercs


Ignore:
Timestamp:
Feb 1, 2009, 10:22:06 PM (12 years ago)
Author:
Pascal Terjan
Message:
  • Improve handling of client death/disconnection
File:
1 edited

Legend:

Unmodified
Added
Removed
  • neercs/trunk/src/server.c

    r3321 r3396  
    4848    {
    4949        fprintf(stderr, "Failed to send message to client: %s\n", strerror(errno));
    50         detach(screen_list);
     50        if(screen_list->attached)
     51            detach(screen_list);
    5152    }
    5253    return ret;
     
    205206            if(!strncmp("ATTACH ", buf, 7))
    206207            {
     208                /* If we were attached to someone else, detach first */
     209                if(screen_list->attached)
     210                    detach(screen_list);
    207211                screen_list->attached = 1;
    208212                caca_free_canvas(screen_list->cv);
Note: See TracChangeset for help on using the changeset viewer.