# | Line 344 | Line 344 | void _tw_process_page(SSL* ssl, int sock | |
---|---|---|
344 | while(1) { | |
345 | if(f != NULL) { | |
346 | char buffer[512]; | |
347 | + | int st; |
348 | fread(buffer, size < 512 ? size : 512, 1, f); | |
349 | < | tw_write(ssl, sock, buffer, size < 512 ? size : 512); |
349 | > | if((st = tw_write(ssl, sock, buffer, size < 512 ? size : 512)) <= 0) break; |
350 | } else { | |
351 | < | tw_write(ssl, sock, (unsigned char*)doc + incr, size < 512 ? size : 512); |
351 | > | if(tw_write(ssl, sock, (unsigned char*)doc + incr, size < 512 ? size : 512) <= 0) break; |
352 | } | |
353 | incr += 512; | |
354 | if(size <= 512) break; |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |