[TPG] Increased serial timeout to account for vend time
authorACC Murphy <wheel@ucc.asn.au>
Sun, 27 Jan 2013 09:13:20 +0000 (09:13 +0000)
committerACC Murphy <wheel@ucc.asn.au>
Sun, 27 Jan 2013 09:13:20 +0000 (09:13 +0000)
sql-edition/servers/SerialClient.py
sql-edition/servers/VendServer.py

index 4025e3b..e0a9a7e 100644 (file)
@@ -13,7 +13,7 @@ class SerialClient:
                        bytesize=EIGHTBITS,     #number of databits
                        parity=PARITY_NONE,     #enable parity checking
                        stopbits=STOPBITS_ONE,  #number of stopbits
-                       timeout=1,           #set a timeout value, None for waiting forever, return on read
+                       timeout=10,           #set a timeout value, None for waiting forever, return on read
                        xonxoff=0,              #enable software flow control
                        rtscts=0,               #enable RTS/CTS flow control
                )
index 2259108..ce75837 100755 (executable)
@@ -1091,8 +1091,9 @@ def do_vend_server(options, config_opts):
                
                try:
                        run_forever(rfh, wfh, options, config_opts)
-               except VendingException:
+               except VendingException as e:
                        logging.error("Connection died, trying again...")
+                       logging.info("Exception: "+e.__str__())
                        logging.info("Trying again in 5 seconds.")
                        sleep(5)
 

UCC git Repository :: git.ucc.asn.au