mirror of
https://github.com/esp8266/Arduino.git
synced 2025-07-30 16:24:09 +03:00
added test case for non-blocking sockets.
git-svn-id: svn://svn.code.sf.net/p/axtls/code/trunk@199 9a5d90b5-6617-0410-8a86-bb477d3ed2e3
This commit is contained in:
@ -1165,13 +1165,15 @@ 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)
|
||||
if (read_len < 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