Don't unlink on 4409
This commit is contained in:
parent
d2d2a230b6
commit
6f4730b42c
2 changed files with 1 additions and 7 deletions
|
@ -263,7 +263,7 @@ export class SocketManager extends EventListener {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (code === 4409) {
|
if (code === 4409) {
|
||||||
this.emit('deviceConflict');
|
log.error('SocketManager: got 4409, connected on another device');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -770,7 +770,6 @@ export class SocketManager extends EventListener {
|
||||||
callback: (error: HTTPError) => void
|
callback: (error: HTTPError) => void
|
||||||
): this;
|
): this;
|
||||||
public override on(type: 'statusChange', callback: () => void): this;
|
public override on(type: 'statusChange', callback: () => void): this;
|
||||||
public override on(type: 'deviceConflict', callback: () => void): this;
|
|
||||||
public override on(type: 'connectError', callback: () => void): this;
|
public override on(type: 'connectError', callback: () => void): this;
|
||||||
|
|
||||||
public override on(
|
public override on(
|
||||||
|
@ -783,7 +782,6 @@ export class SocketManager extends EventListener {
|
||||||
|
|
||||||
public override emit(type: 'authError', error: HTTPError): boolean;
|
public override emit(type: 'authError', error: HTTPError): boolean;
|
||||||
public override emit(type: 'statusChange'): boolean;
|
public override emit(type: 'statusChange'): boolean;
|
||||||
public override emit(type: 'deviceConflict'): boolean;
|
|
||||||
public override emit(type: 'connectError'): boolean;
|
public override emit(type: 'connectError'): boolean;
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
|
|
|
@ -1329,10 +1329,6 @@ export function initialize({
|
||||||
window.Whisper.events.trigger('socketConnectError');
|
window.Whisper.events.trigger('socketConnectError');
|
||||||
});
|
});
|
||||||
|
|
||||||
socketManager.on('deviceConflict', () => {
|
|
||||||
window.Whisper.events.trigger('unlinkAndDisconnect');
|
|
||||||
});
|
|
||||||
|
|
||||||
if (useWebSocket) {
|
if (useWebSocket) {
|
||||||
void socketManager.authenticate({ username, password });
|
void socketManager.authenticate({ username, password });
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue