From 284888df44aac13c266e6b0c6f9bc75dade593fd Mon Sep 17 00:00:00 2001 From: Eric House Date: Sat, 21 Oct 2017 12:13:19 -0700 Subject: [PATCH] add timeoutSecs param --- xwords4/android/scripts/relay.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xwords4/android/scripts/relay.py b/xwords4/android/scripts/relay.py index f04386fb0..b1a18ef8f 100755 --- a/xwords4/android/scripts/relay.py +++ b/xwords4/android/scripts/relay.py @@ -11,14 +11,14 @@ try: except ImportError: apacheAvailable = False -def post(req, params): +def post(req, params, timeoutSecs = 1): err = 'none' dataLen = 0 jobj = json.loads(params) data = base64.b64decode(jobj['data']) sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) - sock.settimeout(1) # seconds + sock.settimeout(timeoutSecs) # seconds addr = ("127.0.0.1", 10997) sock.sendto(data, addr)