Don't unlink on 4409

This commit is contained in:
Fedor Indutny 2024-03-18 10:08:36 -07:00 committed by GitHub
parent d2d2a230b6
commit 6f4730b42c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 1 additions and 7 deletions

View file

@ -263,7 +263,7 @@ export class SocketManager extends EventListener {
}
if (code === 4409) {
this.emit('deviceConflict');
log.error('SocketManager: got 4409, connected on another device');
return;
}
@ -770,7 +770,6 @@ export class SocketManager extends EventListener {
callback: (error: HTTPError) => 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(
@ -783,7 +782,6 @@ export class SocketManager extends EventListener {
public override emit(type: 'authError', error: HTTPError): boolean;
public override emit(type: 'statusChange'): boolean;
public override emit(type: 'deviceConflict'): boolean;
public override emit(type: 'connectError'): boolean;
// eslint-disable-next-line @typescript-eslint/no-explicit-any

View file

@ -1329,10 +1329,6 @@ export function initialize({
window.Whisper.events.trigger('socketConnectError');
});
socketManager.on('deviceConflict', () => {
window.Whisper.events.trigger('unlinkAndDisconnect');
});
if (useWebSocket) {
void socketManager.authenticate({ username, password });
}