You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When doing an intial start with ca. 40 messages including ca 8 attachments, I get "Error: socket hang up" when downloading too fast.
Waiting 500 ms in downloadFile() helps:
--- a/elternportal.js
+++ b/elternportal.js
@@ -59,6 +59,7 @@ function haveOutbound() {
// Downloads from file.url, setting file.filename and file.content.
async function downloadFile(file, options) {
+ await new Promise(resolve => setTimeout(resolve, 500)); // I get "Error: socket hang up" when downloading too fast^M
// Collect buffers and use Buffer.concat() to avoid chunk size arithmetics.
let buffers = [];
// It seems attachment downloads don't need to be throttled.
The text was updated successfully, but these errors were encountered:
When doing an intial start with ca. 40 messages including ca 8 attachments, I get "Error: socket hang up" when downloading too fast.
Waiting 500 ms in
downloadFile()
helps:The text was updated successfully, but these errors were encountered: