Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/mqtt_pal.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@ ssize_t mqtt_pal_sendall(mqtt_pal_socket_handle fd, const void* buf, size_t len,
while(sent < len) {
int rv = mbedtls_ssl_write(fd, (const unsigned char*)buf + sent, len - sent);
if (rv < 0) {
#if defined(MBEDTLS_ERR_SSL_RECEIVED_NEW_SESSION_TICKET)
if (rv == MBEDTLS_ERR_SSL_RECEIVED_NEW_SESSION_TICKET) {
continue;
}
#endif
if (rv == MBEDTLS_ERR_SSL_WANT_READ ||
rv == MBEDTLS_ERR_SSL_WANT_WRITE
#if defined(MBEDTLS_ERR_SSL_ASYNC_IN_PROGRESS)
Expand Down Expand Up @@ -99,6 +104,11 @@ ssize_t mqtt_pal_recvall(mqtt_pal_socket_handle fd, void* buf, size_t bufsz, int
break;
}
if (rv < 0) {
#if defined(MBEDTLS_ERR_SSL_RECEIVED_NEW_SESSION_TICKET)
if (rv == MBEDTLS_ERR_SSL_RECEIVED_NEW_SESSION_TICKET) {
continue;
}
#endif
if (rv == MBEDTLS_ERR_SSL_WANT_READ ||
rv == MBEDTLS_ERR_SSL_WANT_WRITE
#if defined(MBEDTLS_ERR_SSL_ASYNC_IN_PROGRESS)
Expand Down