forked from wolfSSL/wolfssl
fixed bug for Windows build
This commit is contained in:
@ -495,7 +495,6 @@ static INLINE void tcp_accept(SOCKET_T* sockfd, int* clientfd, func_args* args,
|
|||||||
|
|
||||||
static INLINE void tcp_set_nonblocking(SOCKET_T* sockfd)
|
static INLINE void tcp_set_nonblocking(SOCKET_T* sockfd)
|
||||||
{
|
{
|
||||||
(void)sockfd;
|
|
||||||
#ifdef NON_BLOCKING
|
#ifdef NON_BLOCKING
|
||||||
#ifdef USE_WINDOWS_API
|
#ifdef USE_WINDOWS_API
|
||||||
unsigned long blocking = 1;
|
unsigned long blocking = 1;
|
||||||
@ -505,6 +504,7 @@ static INLINE void tcp_set_nonblocking(SOCKET_T* sockfd)
|
|||||||
int ret = fcntl(*sockfd, F_SETFL, flags | O_NONBLOCK);
|
int ret = fcntl(*sockfd, F_SETFL, flags | O_NONBLOCK);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
(void)sockfd;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1588,6 +1588,11 @@ retry:
|
|||||||
return WANT_READ;
|
return WANT_READ;
|
||||||
|
|
||||||
case IO_ERR_CONN_RST: /* connection reset */
|
case IO_ERR_CONN_RST: /* connection reset */
|
||||||
|
#ifdef USE_WINDOWS_API
|
||||||
|
if (ssl->options.dtls) {
|
||||||
|
return WANT_READ;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
ssl->options.connReset = 1;
|
ssl->options.connReset = 1;
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user