Commit 1febf92c authored by deuce's avatar deuce
Browse files

If both rd_p and wr_p are NULL, still read the single char...

parent 88204253
......@@ -217,7 +217,7 @@ BOOL socket_check(SOCKET sock, BOOL* rd_p, BOOL* wr_p, DWORD timeout)
return(TRUE);
}
if(rd_p !=NULL) {
if(rd_p !=NULL || wr_p==NULL) {
rd=recv(sock,&ch,1,MSG_PEEK);
if(rd==1
|| (rd==SOCKET_ERROR && ERROR_VALUE==EMSGSIZE)) {
......@@ -229,5 +229,3 @@ BOOL socket_check(SOCKET sock, BOOL* rd_p, BOOL* wr_p, DWORD timeout)
return(FALSE);
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment