From 7a9666882283fc33eff989d177de35f4d54bbdd3 Mon Sep 17 00:00:00 2001 From: takayama Date: Sat, 18 Jun 2022 21:13:32 +0900 Subject: [PATCH] #377 --- lib/internal/highway.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/internal/highway.ts b/lib/internal/highway.ts index 960b7924..76e9e57b 100644 --- a/lib/internal/highway.ts +++ b/lib/internal/highway.ts @@ -128,9 +128,13 @@ export function highwayUpload(this: Client, readable: stream.Readable, obj: High if (buf.length >= len + 10) { handleRspHeader(buf.slice(9, len + 9)) buf = buf.slice(len + 10) + } else { + break } } - } catch { } + } catch (err) { + this.logger.error(err) + } }) socket.on("close", () => { reject(new ApiRejection(ErrorCode.HighwayNetworkError, "上传遇到网络错误"))