From aa9d0876d7210bb1a141030c1f304523e403f94c Mon Sep 17 00:00:00 2001 From: Mark Qvist Date: Wed, 25 Apr 2018 23:05:30 +0200 Subject: [PATCH] File transfer example --- Examples/Filetransfer.py | 2 +- RNS/Link.py | 2 +- RNS/Transport.py | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Examples/Filetransfer.py b/Examples/Filetransfer.py index d4a7f09..c8d6000 100644 --- a/Examples/Filetransfer.py +++ b/Examples/Filetransfer.py @@ -20,7 +20,7 @@ import RNS.vendor.umsgpack as umsgpack APP_NAME = "example_utilitites" # We'll also define a default timeout, in seconds -APP_TIMEOUT = 5.0 +APP_TIMEOUT = 10.0 ########################################################## #### Server Part ######################################### diff --git a/RNS/Link.py b/RNS/Link.py index 0372706..da2a167 100644 --- a/RNS/Link.py +++ b/RNS/Link.py @@ -29,7 +29,7 @@ class Link: # TODO: This should not be hardcoded, # but calculated from something like # first-hop RTT latency and distance - DEFAULT_TIMEOUT = 5 + DEFAULT_TIMEOUT = 10.0 TIMEOUT_FACTOR = 5 KEEPALIVE = 120 diff --git a/RNS/Transport.py b/RNS/Transport.py index dd5da95..b58987b 100755 --- a/RNS/Transport.py +++ b/RNS/Transport.py @@ -2,6 +2,7 @@ import os import RNS import time import threading +import traceback from time import sleep import vendor.umsgpack as umsgpack @@ -86,6 +87,7 @@ class Transport: except Exception as e: RNS.log("An exception occurred while running Transport jobs.", RNS.LOG_ERROR) RNS.log("The contained exception was: "+str(e), RNS.LOG_ERROR) + traceback.print_exc() Transport.jobs_running = False