Merge pull request #42 from luiscuriel/master

Solved bug with recv on Windows. Fixed indenting
This commit is contained in:
Jack Moffitt
2013-04-20 15:04:52 -07:00

View File

@@ -455,6 +455,11 @@ int tls_read(tls_t *tls, void * const buff, const size_t len)
bytes = sock_read(tls->sock, tls->recvbuffer + tls->recvbufferpos, bytes = sock_read(tls->sock, tls->recvbuffer + tls->recvbufferpos,
tls->recvbuffermaxlen - tls->recvbufferpos); tls->recvbuffermaxlen - tls->recvbufferpos);
if (bytes == 0) {
tls->lasterror = WSAECONNRESET;
return -1;
}
if (bytes == -1) { if (bytes == -1) {
if (!tls_is_recoverable(sock_error())) { if (!tls_is_recoverable(sock_error())) {
tls->lasterror = sock_error(); tls->lasterror = sock_error();