Skip to content

Commit 58d1222

Browse files
committed
Add macro definition for end-of-stream condition
1 parent 354f535 commit 58d1222

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/AsyncTCP_TLS_Context.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
#include "mbedtls/ctr_drbg.h"
1515
#include "mbedtls/error.h"
1616

17-
#define ASYNCTCP_TLS_CAN_RETRY(r) (((r) == MBEDTLS_ERR_SSL_WANT_READ) || ((r) == MBEDTLS_ERR_SSL_WANT_WRITE))
17+
#define ASYNCTCP_TLS_CAN_RETRY(r) (((r) == MBEDTLS_ERR_SSL_WANT_READ) || ((r) == MBEDTLS_ERR_SSL_WANT_WRITE))
18+
#define ASYNCTCP_TLS_EOF(r) (((r) == MBEDTLS_ERR_SSL_CONN_EOF) || ((r) == MBEDTLS_ERR_SSL_PEER_CLOSE_NOTIFY))
1819

1920
class AsyncTCP_TLS_Context
2021
{
@@ -39,8 +40,6 @@ class AsyncTCP_TLS_Context
3940

4041
int _socket;
4142

42-
43-
4443
// Delete certificates used in handshake
4544
void _deleteHandshakeCerts(void);
4645
public:

0 commit comments

Comments
 (0)