We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents bbbfa77 + 1c46afd commit 29666eaCopy full SHA for 29666ea
packages/tfchain_client/lib/src/client.dart
@@ -80,7 +80,13 @@ class QueryClient {
80
provider = connections[url]["provider"];
81
api = connections[url]["api"];
82
if (!provider!.isConnected()) {
83
- api.connect();
+ try {
84
+ await api.connect();
85
+ } catch (e) {
86
+ if (e.toString() != "Exception: Already connected") {
87
+ throw e;
88
+ }
89
90
}
91
} else {
92
provider = Provider.fromUri(Uri.parse(url));
0 commit comments