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)