Skip to content

Commit bf8d62e

Browse files
committed
increase fallback packet size (128 was much smaller than needed)
1 parent 0ab55f5 commit bf8d62e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

js/comms.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -297,11 +297,11 @@ const Comms = {
297297

298298
startUpload().then(doUploadFiles, function(err) {
299299
console.warn("First attempt failed:", err);
300-
if (Const.PACKET_UPLOAD_CHUNKSIZE > 128) {
301-
// Espruino 2v25 has a 1 sec packet timeout (which isn't enough for 1kb packets if sending 20b at a time)
300+
if (Const.PACKET_UPLOAD_CHUNKSIZE > 256) {
301+
// Espruino 2v25 has a 1 sec packet timeout (which isn't enough for 2kb packets if sending 20b at a time)
302302
// https://github.com/espruino/BangleApps/issues/3792#issuecomment-2804668109
303-
console.warn(`Using lower upload chunk size (${Const.PACKET_UPLOAD_CHUNKSIZE} ==> 128)`);
304-
Const.PACKET_UPLOAD_CHUNKSIZE = 128;
303+
console.warn(`Using lower upload chunk size (${Const.PACKET_UPLOAD_CHUNKSIZE} ==> 256)`);
304+
Const.PACKET_UPLOAD_CHUNKSIZE = 256;
305305
}
306306
startUpload().then(doUploadFiles, function(err) {
307307
console.warn("Second attempt failed - bailing.", err);

0 commit comments

Comments
 (0)