fixed bug for Windows build

This commit is contained in:
John Safranek 2012-09-21 16:36:48 -07:00
parent ce2c76fd42
commit 9643e58dad
2 changed files with 6 additions and 1 deletions

View File

@ -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)
{
(void)sockfd;
#ifdef NON_BLOCKING
#ifdef USE_WINDOWS_API
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);
#endif
#endif
(void)sockfd;
}

View File

@ -1588,6 +1588,11 @@ retry:
return WANT_READ;
case IO_ERR_CONN_RST: /* connection reset */
#ifdef USE_WINDOWS_API
if (ssl->options.dtls) {
return WANT_READ;
}
#endif
ssl->options.connReset = 1;
return -1;