Changeset 2597 for neercs/trunk


Ignore:
Timestamp:
Jul 27, 2008, 10:19:02 PM (12 years ago)
Author:
Pascal Terjan
Message:
  • Don't detach on temporary write failure
File:
1 edited

Legend:

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

    r2593 r2597  
    4545    else
    4646        ret = write(screen_list->c_socket, msg, strlen(msg));
    47     if(ret < 0)
     47    if(ret < 0 && errno != EAGAIN)
    4848    {
    4949        fprintf(stderr, "Failed to send message to client: %s\n", strerror(errno));
     
    8787        connect_client(screen_list);
    8888    if(screen_list->c_socket)
    89         if(write(screen_list->c_socket, buf2, bytes+8) <= 0)
     89        if(write(screen_list->c_socket, buf2, bytes+8) <= 0 && errno != EAGAIN)
    9090            detach(screen_list);
    9191    free(buf);
Note: See TracChangeset for help on using the changeset viewer.