1
0
mirror of https://gitlab.xiph.org/xiph/icecast-common.git synced 2024-12-04 14:46:31 -05:00

Fix: Actually check for output flag in connect()

This commit is contained in:
Philipp Schafft 2019-10-01 23:10:43 +00:00
parent 89fccd480b
commit c6b2415ca2

View File

@ -703,6 +703,10 @@ static igloo_error_t igloo_socket_nonblocking__get_return(igloo_socket_t *sock,
switch (sock->action) {
case igloo_SOCKET_ACTION_CONNECT:
if (!out) {
return igloo_ERROR_AGAIN;
}
if (getsockopt(sock->syssock, SOL_SOCKET, SO_ERROR, &val, &val_len) != 0) {
return igloo_ERROR_GENERIC;
}