mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-02-02 11:16:26 +00:00
fix: red dot in non ssl nodes
This commit is contained in:
parent
fa5effd0cc
commit
0777db81c7
1 changed files with 6 additions and 2 deletions
|
@ -232,8 +232,12 @@ class Node extends HiveObject with Keyable {
|
|||
|
||||
Future<bool> requestElectrumServer() async {
|
||||
try {
|
||||
await SecureSocket.connect(uri.host, uri.port,
|
||||
timeout: Duration(seconds: 5), onBadCertificate: (_) => true);
|
||||
if (useSSL == true) {
|
||||
await SecureSocket.connect(uri.host, uri.port,
|
||||
timeout: Duration(seconds: 5), onBadCertificate: (_) => true);
|
||||
} else {
|
||||
await Socket.connect(uri.host, uri.port, timeout: Duration(seconds: 5));
|
||||
}
|
||||
return true;
|
||||
} catch (_) {
|
||||
return false;
|
||||
|
|
Loading…
Reference in a new issue