|
|
@@ -31,7 +31,7 @@ export class ClientApiService implements IApiService{
|
|
31
|
31
|
try{
|
|
32
|
32
|
const sock = new RPCSocket(
|
|
33
|
33
|
auth.port,
|
|
34
|
|
- window.location.hostname
|
|
|
34
|
+ window.location.hostname,
|
|
35
|
35
|
)
|
|
36
|
36
|
|
|
37
|
37
|
sock.hook('kick', () => {
|
|
|
@@ -48,7 +48,7 @@ export class ClientApiService implements IApiService{
|
|
48
|
48
|
|
|
49
|
49
|
sock.on('error', async (e) => {
|
|
50
|
50
|
this.logger.log("priv#error", e);
|
|
51
|
|
-
|
|
|
51
|
+ await this.logout()
|
|
52
|
52
|
//handled via unprivileged socket
|
|
53
|
53
|
})
|
|
54
|
54
|
const authSock = await sock.connect(auth.token.value)
|
|
|
@@ -95,7 +95,6 @@ export class ClientApiService implements IApiService{
|
|
95
|
95
|
throw new Error("Login failed")
|
|
96
|
96
|
}
|
|
97
|
97
|
|
|
98
|
|
- //attach error handler now so failed logins dont trigger reloads
|
|
99
|
98
|
this.socket.on('error', async (err) => {
|
|
100
|
99
|
location.reload()
|
|
101
|
100
|
})
|