mirror of
https://github.com/php/php-src.git
synced 2024-09-22 18:37:25 +00:00
use MSG_PEEK flag for recv() everywhere
This commit is contained in:
parent
e853fec3fd
commit
52686b3226
@ -83,11 +83,11 @@ phpdbg_consume_bytes(int sock, char *ptr, int len, int tmo)
|
||||
}
|
||||
|
||||
while(i > 0) {
|
||||
#ifdef PHP_WIN32
|
||||
/* There's something to read. Read what's available and proceed
|
||||
disregarding whether len could be exhausted or not.*/
|
||||
int can_read = recv(sock, p, i, MSG_PEEK);
|
||||
|
||||
i = can_read;
|
||||
#endif
|
||||
|
||||
got_now = recv(sock, p, i, 0);
|
||||
if (got_now == -1) {
|
||||
return -1;
|
||||
|
Loading…
Reference in New Issue
Block a user