Don't unlink on 4409

This commit is contained in:
Fedor Indutny
2024-03-18 11:00:19 -07:00
committed by GitHub
parent a35767c8fc
commit e4a84b3593
2 changed files with 1 additions and 7 deletions

View File

@@ -249,7 +249,7 @@ export class SocketManager extends EventListener {
}
if (code === 4409) {
this.emit('deviceConflict');
log.error('SocketManager: got 4409, connected on another device');
return;
}
@@ -705,7 +705,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: string | symbol,
@@ -717,7 +716,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;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
public override emit(type: string | symbol, ...args: Array<any>): boolean {

View File

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