Using sock_recv in sock_check
This commit is contained in:
@ -154,7 +154,7 @@ int sock_close(sock *s) {
|
|||||||
int sock_check(sock *s) {
|
int sock_check(sock *s) {
|
||||||
char buf;
|
char buf;
|
||||||
int e = errno;
|
int e = errno;
|
||||||
long ret = recv(s->socket, &buf, 1, MSG_PEEK | MSG_DONTWAIT);
|
long ret = sock_recv(s, &buf, 1, MSG_PEEK | MSG_DONTWAIT);
|
||||||
errno = e;
|
errno = e;
|
||||||
return ret == 1;
|
return ret == 1;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user