disconnect method
Close the sync connection.
Use connect
to connect again.
Implementation
Future<void> disconnect() async {
// Also wrap this in the sync mutex to ensure there's no race between us
// connecting and disconnecting.
await _activeGroup.syncConnectMutex.lock(_abortCurrentSync);
setStatus(
SyncStatus(connected: false, lastSyncedAt: currentStatus.lastSyncedAt));
}