This commit is contained in:
Josh Babb 2023-05-24 13:15:19 -05:00
parent 2762490e6d
commit 81689426e2

View file

@ -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) {