mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-12-23 11:59:30 +00:00
add logs
This commit is contained in:
parent
2762490e6d
commit
81689426e2
1 changed files with 12 additions and 3 deletions
|
@ -36,7 +36,10 @@ class JsonRPC {
|
||||||
.log("JsonRPC json.decode: $e\n$s", level: LogLevel.Error);
|
.log("JsonRPC json.decode: $e\n$s", level: LogLevel.Error);
|
||||||
completer.completeError(e, s);
|
completer.completeError(e, s);
|
||||||
} finally {
|
} finally {
|
||||||
socket?.destroy();
|
Logging.instance
|
||||||
|
.log("JsonRPC dataHandler: not destroying socket ${socket?.address}:${socket?.port}", level: LogLevel.Info);
|
||||||
|
// socket?.destroy();
|
||||||
|
// TODO is this all we need to do?
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -45,11 +48,17 @@ class JsonRPC {
|
||||||
Logging.instance
|
Logging.instance
|
||||||
.log("JsonRPC errorHandler: $error\n$trace", level: LogLevel.Error);
|
.log("JsonRPC errorHandler: $error\n$trace", level: LogLevel.Error);
|
||||||
completer.completeError(error, trace);
|
completer.completeError(error, trace);
|
||||||
socket?.destroy();
|
Logging.instance
|
||||||
|
.log("JsonRPC errorHandler: not destroying socket ${socket?.address}:${socket?.port}", level: LogLevel.Info);
|
||||||
|
// socket?.destroy();
|
||||||
|
// TODO do we need to recreate the socket?
|
||||||
}
|
}
|
||||||
|
|
||||||
void doneHandler() {
|
void doneHandler() {
|
||||||
socket?.destroy();
|
Logging.instance
|
||||||
|
.log("JsonRPC doneHandler: not destroying socket ${socket?.address}:${socket?.port}", level: LogLevel.Info);
|
||||||
|
// socket?.destroy();
|
||||||
|
// TODO is this all we need?
|
||||||
}
|
}
|
||||||
|
|
||||||
if (socket != null) {
|
if (socket != null) {
|
||||||
|
|
Loading…
Reference in a new issue