Skip to content
Commit 73d79674 authored by Robert Lubos's avatar Robert Lubos Committed by Christopher Friedt
Browse files

net: sockets: tls: Fix ZSOCK_POLLHUP detection



The previous approach to detect if the underlying transport was closed
(by checking the return value of `mbedtls_ssl_read()` was not right,
since the function call does not request any data - therefore 0 as a
return value is perfectly fine.

Instead, rely on the underlying transport ZSOCK_POLLHUP event - if it
reports that the connection ended, forward the event to the application.

Signed-off-by: default avatarRobert Lubos <robert.lubos@nordicsemi.no>
parent 76549979
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment