We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 506777a commit 33e784cCopy full SHA for 33e784c
app/lib/service/substrate_api/api.dart
@@ -61,10 +61,11 @@ class Api {
61
Future<void> init() async {
62
_connecting = _connect();
63
64
- _timer = Timer.periodic(const Duration(seconds: 10), (timer) {
+ _timer = Timer.periodic(const Duration(seconds: 10), (timer) async {
65
if (!provider.isConnected()) {
66
- if (_connecting == null) {
+ if (_connecting == null) {
67
Log.p('[webApi] provider is disconnected. Trying to connect again...');
68
+ await close();
69
70
} else {
71
Log.p('[webApi] still trying to connect..');
0 commit comments