net: sockets: Set writefds in case of error in select()
The writefds is typically set if there is an error while waiting for example the connect() to finish. So check if the user supplied the writefds and update it accordingly. Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
This commit is contained in:
parent
ec4973dd15
commit
5bf18e39ad
1 changed files with 5 additions and 0 deletions
|
|
@ -196,6 +196,11 @@ int z_impl_zsock_select(int nfds, zsock_fd_set *readfds, zsock_fd_set *writefds,
|
|||
ZSOCK_FD_SET(fd, exceptfds);
|
||||
num_selects++;
|
||||
}
|
||||
|
||||
if (writefds != NULL) {
|
||||
ZSOCK_FD_SET(fd, writefds);
|
||||
num_selects++;
|
||||
}
|
||||
}
|
||||
|
||||
res--;
|
||||
|
|
|
|||
Loading…
Reference in a new issue