aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeffrey Armstrong <jeff@approximatrix.com>2021-08-17 08:47:14 -0400
committerJeffrey Armstrong <jeff@approximatrix.com>2021-08-17 08:47:14 -0400
commit010380a9afc53db7e200db2e7c04b86269dfd1e0 (patch)
treeaa053f1dc9a63a2cb63e41677571c16476c74703
parentd1e500b626de0c906273f3cf4e21479779f48aef (diff)
downloadlevitating-010380a9afc53db7e200db2e7c04b86269dfd1e0.tar.gz
levitating-010380a9afc53db7e200db2e7c04b86269dfd1e0.zip
Added client-side message when titan errors with tempfail
-rw-r--r--player/tasks.f907
1 files changed, 6 insertions, 1 deletions
diff --git a/player/tasks.f90 b/player/tasks.f90
index b0f2cc1..efc0fe4 100644
--- a/player/tasks.f90
+++ b/player/tasks.f90
@@ -152,7 +152,7 @@ contains
function upload(url, source_filename) result(res)
use config, only: token, captain, identity
- use gemini_protocol, only: titan_post_url, STATUS_SUCCESS
+ use gemini_protocol, only: titan_post_url, STATUS_SUCCESS, STATUS_TEMPFAIL
implicit none
logical::res
@@ -211,6 +211,11 @@ contains
Print *, "Writing "//trim(mod_url)
istatus = titan_post_url(mod_url, unit_number, file_size, trim(identity)//":"//trim(token))
Print *, "Response code from server: ", istatus
+
+ if(istatus == STATUS_TEMPFAIL) then
+ Print *, "Server failed to finish handling file - temporary failure"
+ end if
+
res = (istatus == STATUS_SUCCESS)
close(unit_number)
else