From b385ab819019ec29cd44e9c9e6ae8be333298ef2 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 12 Jun 2016 10:57:29 +0000 Subject: code cleaning git-svn-id: http://svn.miranda-ng.org/main/trunk@16950 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- src/mir_app/src/netlibsock.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src') 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); } -- cgit v1.2.3