Skip to content

Commit 8d86f3c

Browse files
donghengdongheng
dongheng
authored and
dongheng
committed
fix(tcp_transport): fix SSL read blocked when the connecttion is closed
1 parent a227a22 commit 8d86f3c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

components/tcp_transport/transport_ssl.c

+1
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ static int ssl_read(esp_transport_handle_t t, char *buffer, int len, int timeout
129129
ret = esp_tls_conn_read(ssl->tls, (unsigned char *)buffer, len);
130130
if (ret <= 0) {
131131
ESP_LOGE(TAG, "esp_tls_conn_read error, errno=%s", strerror(errno));
132+
return -1;
132133
}
133134
return ret;
134135
}

0 commit comments

Comments
 (0)