[riot-notifications] [RIOT-OS/RIOT] sock_dtls: add timeout to sock_dtls_send and sock_dtls_session_create (#14043)

Martine Lenders notifications at github.com
Tue May 12 14:37:20 CEST 2020


@miri64 commented on this pull request.



>              /* handshake initiated, wait until connected or timed out */
 
             msg_t msg;
             do {
-                res = xtimer_msg_receive_timeout(&msg, 3 * DTLS_HANDSHAKE_TIMEOUT);
+                uint32_t start = xtimer_now_usec();
+                res = xtimer_msg_receive_timeout(&msg, timeout);
+
+                if (timeout != SOCK_NO_TIMEOUT) {
+                    timeout = _update_timeout(start, timeout);
+                }

```suggestion
                }
                if (timeout == 0) {
                    return -ETIMEOUT;
                }
```

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/14043#pullrequestreview-409995570
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20200512/f61b6ab1/attachment-0001.htm>


More information about the notifications mailing list