forked from wolfSSL/wolfssl
div by 4 in milliseconds
This commit is contained in:
12
src/wolfio.c
12
src/wolfio.c
@@ -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");
|
||||
}
|
||||
|
Reference in New Issue
Block a user