mirror of
https://github.com/vrtmrz/obsidian-livesync.git
synced 2026-01-23 13:37:11 +00:00
## Improved
- Improved connectivity for P2P connections - The connection to the signalling server can now be disconnected while in the background or when explicitly disconnected. - These features use a patch that has not been incorporated upstream.
This commit is contained in:
@@ -174,6 +174,13 @@ export class P2PReplicator
|
||||
if (this.settings.P2P_Enabled && this.settings.P2P_AutoStart) {
|
||||
setTimeout(() => void this.open(), 100);
|
||||
}
|
||||
const rep = this._replicatorInstance;
|
||||
rep?.allowReconnection();
|
||||
return Promise.resolve(true);
|
||||
}
|
||||
$everyBeforeSuspendProcess(): Promise<boolean> {
|
||||
const rep = this._replicatorInstance;
|
||||
rep?.disconnectFromServer();
|
||||
return Promise.resolve(true);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user