div by 4 in milliseconds

This commit is contained in:
Anthony Hu
2022-06-21 10:48:48 -04:00
parent ff4eabb17f
commit f05bcb30e0

View File

@@ -2150,12 +2150,12 @@ int MicriumReceive(WOLFSSL *ssl, char *buf, int sz, void *ctx)
/* needs timeout in milliseconds */
#ifdef WOLFSSL_DTLS13
if (wolfSSL_dtls13_use_quick_timeout(ssl) &&
IsAtLeastTLSv1_3(ssl->version) && (dtls_timeout >= 4)) {
dtls_timeout = dtls_timeout / 4;
IsAtLeastTLSv1_3(ssl->version)) {
dtls_timeout = (1000 * dtls_timeout) / 4;
}
#endif /* WOLFSSL_DTLS13 */
NetSock_CfgTimeoutRxQ_Set(sd, dtls_timeout * 1000, &err);
NetSock_CfgTimeoutRxQ_Set(sd, dtls_timeout, &err);
if (err != NET_SOCK_ERR_NONE) {
WOLFSSL_MSG("NetSock_CfgTimeoutRxQ_Set failed");
}
@@ -2228,12 +2228,12 @@ int MicriumReceiveFrom(WOLFSSL *ssl, char *buf, int sz, void *ctx)
/* needs timeout in milliseconds */
#ifdef WOLFSSL_DTLS13
if (wolfSSL_dtls13_use_quick_timeout(ssl) &&
IsAtLeastTLSv1_3(ssl->version) && (dtls_timeout >= 4)) {
dtls_timeout = dtls_timeout / 4;
IsAtLeastTLSv1_3(ssl->version)) {
dtls_timeout = (1000 * dtls_timeout) / 4;
}
#endif /* WOLFSSL_DTLS13 */
NetSock_CfgTimeoutRxQ_Set(sd, dtls_timeout * 1000, &err);
NetSock_CfgTimeoutRxQ_Set(sd, dtls_timeout, &err);
if (err != NET_SOCK_ERR_NONE) {
WOLFSSL_MSG("NetSock_CfgTimeoutRxQ_Set failed");
}