Changeset 394 in Main for trunk/Server


Ignore:
Timestamp:
Oct 28, 2024, 8:55:11 AM (3 weeks ago)
Author:
Nishi
Message:

handle error

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Server/server.c

    r393 r394  
    346346                        char buffer[512];
    347347                        fread(buffer, size < 512 ? size : 512, 1, f);
    348                         tw_write(ssl, sock, buffer, size < 512 ? size : 512);
     348                        if(tw_write(ssl, sock, buffer, size < 512 ? size : 512) < 0) return;
    349349                } else {
    350                         tw_write(ssl, sock, (unsigned char*)doc + incr, size < 512 ? size : 512);
     350                        if(tw_write(ssl, sock, (unsigned char*)doc + incr, size < 512 ? size : 512) < 0) return;
    351351                }
    352352                incr += 512;
Note: See TracChangeset for help on using the changeset viewer.