Fix sock_had_pending for pipe
This commit is contained in:
1 parent
7fe4abd379
commit
52ebad201f
1 file changed
+3
-1
+3
-1
@@ -390,7 +390,9 @@ int sock_has_pending(sock *s, int flags) {
|
||||
int e = errno;
|
||||
long ret;
|
||||
if (s->pipe) {
|
||||
ioctl(s->socket, FIONREAD, &ret);
|
||||
int arg;
|
||||
ioctl(s->socket, FIONREAD, &arg);
|
||||
ret = arg;
|
||||
} else if (s->enc && (flags & SOCK_DONTWAIT)) {
|
||||
ret = SSL_pending(s->ssl);
|
||||
} else {
|
||||
|
||||
Reference in new issue
Block a user