Updated the package version to 1.5.0 and some minor changes
parent
be9f199c03
commit
46d9ead8ba
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "teaspeak-web",
|
||||
"version": "1.2.0",
|
||||
"version": "1.5.0",
|
||||
"description": "Welcome here! This repository is created with two reasons:\n 1. People can bring their own ideas and follow their implementation\n 2. People can see TeaSpeak Web client progress and avoid creating repetitive issues all the time.",
|
||||
"scripts": {
|
||||
"compile-project-base": "tsc -p tsbaseconfig.json",
|
||||
|
|
|
@ -17,7 +17,7 @@ export interface CommandOptions {
|
|||
export const CommandOptionDefaults: CommandOptions = {
|
||||
flagset: [],
|
||||
process_result: true,
|
||||
timeout: 1000
|
||||
timeout: 10_000
|
||||
};
|
||||
|
||||
export interface ServerConnectionEvents {
|
||||
|
|
|
@ -76,6 +76,12 @@ const ConnectionStateRenderer = React.memo((props: { state: ConnectionStatus, is
|
|||
statusBody = <Translatable key={"healthy"}>Healthy</Translatable>;
|
||||
break;
|
||||
|
||||
case "unsupported":
|
||||
title = tr("Not supported");
|
||||
statusClass = cssStyle.disconnected;
|
||||
statusBody = <Translatable key={"not-supported"}>Not supported</Translatable>;
|
||||
break;
|
||||
|
||||
default:
|
||||
statusClass = cssStyle.unhealthy;
|
||||
statusBody = <Translatable key={"invalid-state"}>Invalid state</Translatable>;
|
||||
|
|
|
@ -131,7 +131,7 @@ export class ServerConnection extends AbstractServerConnection {
|
|||
|
||||
async connect(address : ServerAddress, handshake: HandshakeHandler, timeout?: number) : Promise<void> {
|
||||
const connectBeginTimestamp = Date.now();
|
||||
timeout = typeof(timeout) === "number" ? timeout : 5000;
|
||||
timeout = typeof(timeout) === "number" ? timeout : 10_000;
|
||||
|
||||
try {
|
||||
await this.disconnect();
|
||||
|
@ -469,7 +469,7 @@ export class ServerConnection extends AbstractServerConnection {
|
|||
listener.timeout = setTimeout(() => {
|
||||
this.returnListeners.remove(listener);
|
||||
listener.reject("timeout");
|
||||
}, 1500);
|
||||
}, options.timeout || 15_000);
|
||||
this.returnListeners.push(listener);
|
||||
|
||||
this.sendData(ServerConnection.commandDataToJson({
|
||||
|
|
Loading…
Reference in New Issue