From db64723c24d66f82dc4ac3bbf01dfc00e0ece6b4 Mon Sep 17 00:00:00 2001 From: Krishnaraj Bhat Date: Sat, 3 Jun 2017 13:34:58 +0530 Subject: [PATCH] Add timeout for jayson client requests request() didn't hit the callback sometimes fixes #19 fixes #188 --- app/main.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/main.js b/app/main.js index 889fa0402..85a0dd3c7 100644 --- a/app/main.js +++ b/app/main.js @@ -21,7 +21,13 @@ const VERSION_CHECK_INTERVAL = 30 * 60 * 1000; const LATEST_RELEASE_API_URL = 'https://api.github.com/repos/lbryio/lbry-app/releases/latest'; -let client = jayson.client.http('http://localhost:5279/lbryapi'); +let client = jayson.client.http({ + host: 'localhost', + port: 5279, + path: '/lbryapi', + timeout: 1000 +}); + // Keep a global reference of the window object, if you don't, the window will // be closed automatically when the JavaScript object is garbage collected. let win; -- 2.45.2