-
Notifications
You must be signed in to change notification settings - Fork 260
fix(datastore): Restart Sync Engine when network on/off #5218
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
676dd67
bb22b24
c374c51
08f89cf
c0388b1
42e49ef
b0bd424
5c0245a
f70dbc3
5619bee
2c9887b
bfbf267
5094ec4
6cb7636
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import 'package:meta/meta.dart'; // Importing the 'meta' package to use the @internal annotation | ||
|
||
/// An internal class to control websocket features after API plugin has been initialized. | ||
@internal | ||
class WebSocketOptions { | ||
/// Private constructor to prevent instantiation | ||
WebSocketOptions._(); | ||
|
||
/// Private static boolean field | ||
static bool _autoReconnect = true; | ||
|
||
/// Static getter method for the boolean field | ||
@internal | ||
static bool get autoReconnect => _autoReconnect; | ||
|
||
/// Static setter method for the boolean field | ||
@internal | ||
static set autoReconnect(bool value) { | ||
_autoReconnect = value; | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Q: I don't see the native code to call WebSocketOptions.autoReconnect = true, is it expected?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes this is expected. Swift has it's own reconnection logic that is used for DataStore. Having them both enabled created race conditions, so I disabled Flutter's in favor of Swift because it's also tied to restarting the sync engine.