diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/mir_app/src/netlibsock.cpp | 9 | 
1 files changed, 4 insertions, 5 deletions
diff --git a/src/mir_app/src/netlibsock.cpp b/src/mir_app/src/netlibsock.cpp index 58a0857d12..9bef238770 100644 --- a/src/mir_app/src/netlibsock.cpp +++ b/src/mir_app/src/netlibsock.cpp @@ -112,7 +112,7 @@ static int ConnectionListToSocketList(HANDLE *hConns, fd_set *fd, int& pending)  			return 0;
  		}
  		FD_SET(nlcCheck->s, fd);
 -		if (sslApi.pending(nlcCheck->hSsl))
 +		if (!nlcCheck->foreBuf.isEmpty() || sslApi.pending(nlcCheck->hSsl))
  			pending++;
  	}
  	return 1;
 @@ -126,10 +126,6 @@ INT_PTR NetlibSelect(WPARAM, LPARAM lParam)  		return SOCKET_ERROR;
  	}
 -	TIMEVAL tv;
 -	tv.tv_sec = nls->dwTimeout/1000;
 -	tv.tv_usec = (nls->dwTimeout%1000)*1000;
 -
  	int pending = 0;
  	fd_set readfd, writefd, exceptfd;
  	WaitForSingleObject(hConnectionHeaderMutex, INFINITE);
 @@ -144,6 +140,9 @@ INT_PTR NetlibSelect(WPARAM, LPARAM lParam)  	if (pending)
  		return 1;
 +	TIMEVAL tv;
 +	tv.tv_sec = nls->dwTimeout / 1000;
 +	tv.tv_usec = (nls->dwTimeout % 1000) * 1000;
  	return select(0, &readfd, &writefd, &exceptfd, nls->dwTimeout == INFINITE ? NULL : &tv);
  }
  | 
