Using sock_recv in sock_check

This commit is contained in:
2023-01-02 17:28:40 +01:00
parent 95e2ddb24c
commit 8d6b7105f3

View File

@ -154,7 +154,7 @@ int sock_close(sock *s) {
int sock_check(sock *s) {
char buf;
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;
return ret == 1;
}