Don't unlink on 4409

Co-authored-by: Fedor Indutny <79877362+indutny-signal@users.noreply.github.com>
This commit is contained in:
automated-signal
2024-03-18 12:59:45 -05:00
committed by GitHub
parent abb967c8d5
commit 39657cfaf0
2 changed files with 1 additions and 7 deletions

View File

@@ -253,7 +253,7 @@ export class SocketManager extends EventListener {
}
if (code === 4409) {
this.emit('deviceConflict');
log.error('SocketManager: got 4409, connected on another device');
return;
}
@@ -709,7 +709,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(
@@ -722,7 +721,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 });
}