mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-15 00:02:49 +03:00
Added Visual Studio 2010 support and fixed some VS compilation issues.
Removed code to force blocking mode. git-svn-id: svn://svn.code.sf.net/p/axtls/code/trunk@196 9a5d90b5-6617-0410-8a86-bb477d3ed2e3
This commit is contained in:
@ -287,6 +287,7 @@ EXP_FUNC int STDCALL ssl_read(SSL *ssl, uint8_t **in_data)
|
||||
int ret = basic_read(ssl, in_data);
|
||||
|
||||
/* check for return code so we can send an alert */
|
||||
|
||||
if (ret < SSL_OK && ret != SSL_CLOSE_NOTIFY)
|
||||
{
|
||||
if (ret != SSL_ERROR_CONN_LOST)
|
||||
@ -1159,6 +1160,14 @@ int basic_read(SSL *ssl, uint8_t **in_data)
|
||||
read_len = SOCKET_READ(ssl->client_fd, &buf[ssl->bm_read_index],
|
||||
ssl->need_bytes-ssl->got_bytes);
|
||||
|
||||
if (ret < 0)
|
||||
#ifdef WIN32
|
||||
if (GetLastError() == WSAEWOULDBLOCK)
|
||||
#else
|
||||
if (errno == EAGAIN || errno == EWOULDBLOCK)
|
||||
#endif
|
||||
return 0;
|
||||
|
||||
/* connection has gone, so die */
|
||||
if (read_len <= 0)
|
||||
{
|
||||
|
Reference in New Issue
Block a user