From b77cbfb1d467ae3f2c1be9d58cad7311441c7890 Mon Sep 17 00:00:00 2001 From: Mateusz Kwiatkowski Date: Tue, 2 Aug 2022 16:23:53 +0200 Subject: [PATCH 1/2] lowered maximum message size for ndt7 upload test this should fix connection closed prematurely for upload test on chrome --- html/ndt7-upload.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/html/ndt7-upload.js b/html/ndt7-upload.js index a24975ff..87e51a19 100644 --- a/html/ndt7-upload.js +++ b/html/ndt7-upload.js @@ -18,7 +18,7 @@ onmessage = function (ev) { sock.close() return } - const maxMessageSize = 16777216 /* = (1<<24) = 16MB */ + const maxMessageSize = 8388608 /* = (1<<2) = 8MB */ if (data.length < maxMessageSize && data.length < (total - sock.bufferedAmount)/16) { data = new Uint8Array(data.length * 2) // TODO(bassosimone): fill this message } From efa60dbffe975fb4e720a28fc71758b8c16374c5 Mon Sep 17 00:00:00 2001 From: Mateusz Kwiatkowski Date: Tue, 2 Aug 2022 16:25:07 +0200 Subject: [PATCH 2/2] fixed typo in line comment --- html/ndt7-upload.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/html/ndt7-upload.js b/html/ndt7-upload.js index 87e51a19..3e087cae 100644 --- a/html/ndt7-upload.js +++ b/html/ndt7-upload.js @@ -18,7 +18,7 @@ onmessage = function (ev) { sock.close() return } - const maxMessageSize = 8388608 /* = (1<<2) = 8MB */ + const maxMessageSize = 8388608 /* = (1<<23) = 8MB */ if (data.length < maxMessageSize && data.length < (total - sock.bufferedAmount)/16) { data = new Uint8Array(data.length * 2) // TODO(bassosimone): fill this message }