uu
This commit is contained in:
parent
467fa587b6
commit
775d5ac088
@ -374,7 +374,6 @@ export default {
|
|||||||
// 2.建议每次写入不超过20字节
|
// 2.建议每次写入不超过20字节
|
||||||
// 分包处理,延时调用
|
// 分包处理,延时调用
|
||||||
const maxChunk = 20;
|
const maxChunk = 20;
|
||||||
const delay = 20;
|
|
||||||
for (let i = 0, j = 0, length = buffer.byteLength; i < length; i += maxChunk, j++) {
|
for (let i = 0, j = 0, length = buffer.byteLength; i < length; i += maxChunk, j++) {
|
||||||
let subPackage = buffer.slice(i, i + maxChunk <= length ? (i + maxChunk) : length);
|
let subPackage = buffer.slice(i, i + maxChunk <= length ? (i + maxChunk) : length);
|
||||||
try{
|
try{
|
||||||
@ -382,7 +381,8 @@ export default {
|
|||||||
}catch(msg){
|
}catch(msg){
|
||||||
console.log("printbuffs:异常==", msg)
|
console.log("printbuffs:异常==", msg)
|
||||||
showToast('分段printbuff异常', msg)
|
showToast('分段printbuff异常', msg)
|
||||||
return reject(msg)
|
reject(msg)
|
||||||
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
resolve()
|
resolve()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user