dtls-sock: check msg_try_receive return value
This commit is contained in:
parent
7b13781cd2
commit
ab4e5df473
@ -108,8 +108,7 @@ void *dtls_server_wrapper(void *arg)
|
|||||||
}
|
}
|
||||||
|
|
||||||
while (active) {
|
while (active) {
|
||||||
msg_try_receive(&msg);
|
if ((msg_try_receive(&msg) == 1) && (msg.type == DTLS_STOP_SERVER_MSG)) {
|
||||||
if (msg.type == DTLS_STOP_SERVER_MSG) {
|
|
||||||
active = false;
|
active = false;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user