send next available request in queue if isNotEmpty

This commit is contained in:
Josh Babb 2023-05-25 13:56:18 -05:00
parent 6ca51c99c9
commit ba41094ed2

View file

@ -56,6 +56,14 @@ class JsonRPC {
level: LogLevel.Info, level: LogLevel.Info,
); );
_socket?.destroy(); _socket?.destroy();
if (_requestQueue.isNotEmpty) {
Logging.instance.log(
"JsonRPC doneHandler: sending next request in queue",
level: LogLevel.Warning,
);
_sendNextAvailableRequest();
}
} }
Future<void> _onReqCompleted(_JsonRPCRequest req) async { Future<void> _onReqCompleted(_JsonRPCRequest req) async {