<p></p>
<p><b>@miri64</b> commented on this pull request.</p>

<hr>

<p>In <a href="https://github.com/RIOT-OS/RIOT/pull/14043#discussion_r424210199">pkg/tinydtls/contrib/sock_dtls.c</a>:</p>
<pre style='color:#555'>>              /* 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);
+                }
</pre>
<p>(but yes, in general I think it is more readable :-))</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/RIOT-OS/RIOT/pull/14043#discussion_r424210199">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABE7WYAFMXMSROV34TGAJMDRRI7XHANCNFSM4M4CRRDQ">unsubscribe</a>.<img src="https://github.com/notifications/beacon/ABE7WYCGKJC2Y6PFHXMDFTTRRI7XHA5CNFSM4M4CRRD2YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGODB44OCQ.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/RIOT-OS/RIOT/pull/14043#discussion_r424210199",
"url": "https://github.com/RIOT-OS/RIOT/pull/14043#discussion_r424210199",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>