diff options
author | George Hazan <george.hazan@gmail.com> | 2016-06-12 10:57:29 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2016-06-12 10:57:29 +0000 |
commit | b385ab819019ec29cd44e9c9e6ae8be333298ef2 (patch) | |
tree | 84752003df7ec122d2e6e50cd651acd05a771ea4 /src | |
parent | f99f0228cbfc908812ebbeec6415818dd5650010 (diff) |
code cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@16950 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
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);
}
|