aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gnunet-build/packages/gnunet/gnunet/files/client.js9
-rw-r--r--src/hl/index.cljs.hl14
2 files changed, 19 insertions, 4 deletions
diff --git a/gnunet-build/packages/gnunet/gnunet/files/client.js b/gnunet-build/packages/gnunet/gnunet/files/client.js
index b99655d..06b4cde 100644
--- a/gnunet-build/packages/gnunet/gnunet/files/client.js
+++ b/gnunet-build/packages/gnunet/gnunet/files/client.js
@@ -47,8 +47,13 @@ mergeInto(LibraryManager.library, {
if (typeof client_connect == "function")
client_connect(service_name, channel.port2);
else
- gnunet_web.service.client_connect(service_name, "client.js",
- channel.port2);
+ try {
+ gnunet_web.service.client_connect(service_name, "client.js",
+ channel.port2);
+ } catch(e) {
+ console.error("Failed to connect to " + service_name, e);
+ return 0;
+ }
return port;
},
GNUNET_CLIENT_disconnect__deps: ['$CLIENT_PORTS'],
diff --git a/src/hl/index.cljs.hl b/src/hl/index.cljs.hl
index aad44f0..5310a46 100644
--- a/src/hl/index.cljs.hl
+++ b/src/hl/index.cljs.hl
@@ -33,7 +33,13 @@
(js/MessageChannel.)
(catch :default e
(reset! browser-support
- "Your browser does not support MessageChannel. This website will not work.")))
+ "This website requires MessageChannel support. Try Chromium or Google Chrome.")))
+
+(try
+ (js/SharedWorker.)
+ (catch :default e
+ (reset! browser-support
+ "This website requires SharedWorker support. Try Chromium or Google Chrome.")))
(defn peer-id-short
[peer]
@@ -129,8 +135,12 @@
(recur))))))
(.readAsArrayBuffer reader file)))
-(def topology-worker (service/start-worker "topology"
+(try
+ (def topology-worker (service/start-worker "topology"
"js/gnunet-daemon-topology.js"))
+ (catch :default e
+ nil))
+
(hostlist/fetch-and-process!)
(defelem ui-search