1
0
mirror of https://gitlab.nic.cz/turris/reforis/foris-js.git synced 2024-12-25 00:11:36 +01:00

Fix infinity loop caused by WebSockets

This commit is contained in:
Aleksandr Gumroian 2020-09-02 15:57:28 +02:00
parent 4ff814f0fd
commit 90ce866869
No known key found for this signature in database
GPG Key ID: 9E77849C64F0A733

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2019 CZ.NIC z.s.p.o. (http://www.nic.cz/)
* Copyright (C) 2020 CZ.NIC z.s.p.o. (http://www.nic.cz/)
*
* This is free software, licensed under the GNU General Public License v3.
* See /LICENSE for more information.
@ -12,7 +12,7 @@ import { ForisURLs } from "../utils/forisUrls";
const PROTOCOL = window.location.protocol === "http:" ? "ws" : "wss";
const URL = process.env.LIGHTTPD
? `${PROTOCOL}://${window.location.hostname}/foris-ws`
? `${PROTOCOL}://${window.location.host}/foris-ws`
: `${PROTOCOL}://${window.location.hostname}:${9081}`;
const WAITING_FOR_CONNECTION_TIMEOUT = 500;