-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
Hi!
Could it be the connection isn't closed properly after the response?
I'm using this on Heroku, to keep the connection open when generating a PDF.
The code is below. But recently it started throwing H15 desc="Idle connection" errors.
Any pointers?
res.setHeader('content-type', 'text/html');
res.write('Creating PDf... Wait for it...');
var delayed = new DelayedResponse(req, res);
delayed.start()
makeFullPdf( function(pdfurl){
console.log('PDF ready');
var html='<br/><A HREF="'+pdfurl+'"> Open PDF</A>';
html+='<script>window.location="'+pdfurl+'"; </script>'; //JS as we can't send headers at this point
delayed.end(null, html);
res.end();
})
Thanks!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels