Skip to content

Commit 3a43f59

Browse files
SyncClient: for triggerReconnect don't treat failure as exception #159
1 parent 88521ea commit 3a43f59

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

objectbox/lib/src/native/sync.dart

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -407,14 +407,13 @@ class SyncClient {
407407
checkObx(C.sync_stop(_ptr));
408408
}
409409

410-
/// Triggers a reconnection attempt immediately.
410+
/// Triggers a reconnection attempt immediately. Returns if a reconnect was
411+
/// actually triggered.
411412
///
412413
/// By default, an increasing backoff interval is used for reconnection
413414
/// attempts. But sometimes the code using this API has additional knowledge
414415
/// and can initiate a reconnection attempt sooner.
415-
void triggerReconnect() {
416-
checkObx(C.sync_trigger_reconnect(_ptr));
417-
}
416+
bool triggerReconnect() => checkObxSuccess(C.sync_trigger_reconnect(_ptr));
418417

419418
/// Request updates since we last synchronized our database.
420419
///

0 commit comments

Comments
 (0)