1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

dtls-echo: check msg_try_receive return value

This commit is contained in:
Sören Tempel 2019-12-09 14:17:26 +01:00
parent ab4e5df473
commit 7b463b6c95

View File

@ -345,9 +345,7 @@ void *_dtls_server_wrapper(void *arg)
}
while (active) {
msg_try_receive(&msg); /* Check if we got an (thread) message */
if (msg.type == DTLS_STOP_SERVER_MSG) {
if ((msg_try_receive(&msg) == -1) && (msg.type == DTLS_STOP_SERVER_MSG)) {
active = false;
}
else {