comment mutex code

This commit is contained in:
Josh Babb 2023-05-24 15:55:24 -05:00
parent 7bb74455cd
commit 866b7c4e88

View file

@ -2,6 +2,7 @@ import 'dart:async';
import 'dart:convert';
import 'dart:io';
import 'dart:typed_data';
// import 'package:mutex/mutex.dart';
import 'package:stackwallet/utilities/logger.dart';
@ -21,6 +22,8 @@ class JsonRPC {
Socket? socket;
StreamSubscription<Uint8List>? _subscription;
// final m = Mutex();
void Function(List<int>)? _onData;
void Function(Object, StackTrace)? _onError;
@ -80,7 +83,9 @@ class JsonRPC {
if (socket != null) {
// TODO check if the socket is valid, alive, connected, etc
}
// Do we need to check the subscription, too?w
// Do we need to check the subscription, too?
// await m.acquire();
if (useSSL) {
socket ??= await SecureSocket.connect(host, port,
@ -107,6 +112,8 @@ class JsonRPC {
socket?.write('$jsonRpcRequest\r\n');
// m.release();
return completer.future;
}
}