修复ws
This commit is contained in:
parent
cfe970bd45
commit
a4252af6ed
@ -1,9 +1,7 @@
|
|||||||
import { getToken } from "./auth";
|
|
||||||
|
|
||||||
const { protocol, hostname, origin, port } = window.location;
|
const { protocol, hostname, origin, port } = window.location;
|
||||||
const wsProtocol = protocol.startsWith("https") ? "wss" : "ws";
|
const wsProtocol = protocol.startsWith("https") ? "wss" : "ws";
|
||||||
const url = `${wsProtocol}://${hostname}${
|
const url = `${wsProtocol}://${hostname}${
|
||||||
port === "80" || port === "443" ? "" : `:${8091}`
|
hostname === "localhost" ? `:${8091}` : ""
|
||||||
}/ws`;
|
}/ws`;
|
||||||
let ws = undefined;
|
let ws = undefined;
|
||||||
let intervalRef = undefined;
|
let intervalRef = undefined;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user