diff options
author | Jeffrey Armstrong <jeff@approximatrix.com> | 2023-01-02 11:50:39 -0500 |
---|---|---|
committer | Jeffrey Armstrong <jeff@approximatrix.com> | 2023-01-02 11:50:39 -0500 |
commit | 462715e11037739722457e48084a73daa9e5d889 (patch) | |
tree | 0704f69e9c69f7a16ffae74421392aecd145399e /common/request.f90 | |
parent | 89e74e6c7c8d6d98939a24fa3f77b9caff2dec07 (diff) | |
download | levitating-462715e11037739722457e48084a73daa9e5d889.tar.gz levitating-462715e11037739722457e48084a73daa9e5d889.zip |
Added a timeout to read functions such that failures don't occur immediately. Seems to be a culprit in the upload failures.
Diffstat (limited to 'common/request.f90')
-rw-r--r-- | common/request.f90 | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/common/request.f90 b/common/request.f90 index ce81ae6..91aa67a 100644 --- a/common/request.f90 +++ b/common/request.f90 @@ -287,7 +287,7 @@ contains end function send_string - function retrieve_characters(ssl, arr) result(chars_read) + function retrieve_characters(ssl, arr, timeout) result(chars_read) use iso_c_binding use jessl implicit none @@ -295,8 +295,13 @@ contains integer::chars_read type(c_ptr)::ssl character(len=1), dimension(:), intent(inout)::arr + integer, intent(in), optional::timeout - chars_read = ssl_read(ssl, arr) + if(present(timeout)) then + chars_read = ssl_read(ssl, arr, timeout) + else + chars_read = ssl_read(ssl, arr, 250) + end if end function retrieve_characters |