Skip to content

Commit

Permalink
Merge pull request #365 from mkwiatkowskisoldevelo/feature/max-messag…
Browse files Browse the repository at this point in the history
…e-size

Lowering max message size in upload worker
  • Loading branch information
robertodauria committed Aug 18, 2022
2 parents a0ef3fc + efa60db commit a5e9530
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion html/ndt7-upload.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ onmessage = function (ev) {
sock.close()
return
}
const maxMessageSize = 16777216 /* = (1<<24) = 16MB */
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
}
Expand Down

0 comments on commit a5e9530

Please sign in to comment.