From 48512f5d2e180d2086162cdf06c96098e6de96d7 Mon Sep 17 00:00:00 2001 From: Jeffrey Armstrong Date: Wed, 3 Jun 2020 17:26:03 -0400 Subject: Added true error conditions to block infinite requests on failure. --- protocol.f90 | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'protocol.f90') diff --git a/protocol.f90 b/protocol.f90 index 4948325..adb3760 100644 --- a/protocol.f90 +++ b/protocol.f90 @@ -102,7 +102,7 @@ contains use request use iso_c_binding use file_handling, only: mark_file_end - use binary, only: binary_handler, is_binary_file, binary_okay + use binary, only: binary_handler, is_binary_file, binary_okay, binary_ignore implicit none character(*), intent(inout)::url @@ -203,6 +203,10 @@ contains write(binary_unit) buffer(i) + else if(binary_file .and. binary_status == binary_ignore) then + + exit + end if if(.not. binary_file) then @@ -213,6 +217,11 @@ contains end do + ! If the user has bailed... + if(binary_file .and. binary_status == binary_ignore) then + exit + end if + bytes_received = retrieve_characters(conn%ssl, buffer) end do -- cgit v1.2.3