Need a special offer?Find out if your project fits.
+

Can't terminate stream when using compressor

Answered
Allan Lima asked on March 19, 2019

So, here is my problem:
 
I have a pg database, using pg streams and flexmonster-compressor to stream data to my front end. Sometimes some of my data can be sent empty ( and that's ok for our business model ). 

But when using compressor-stream, the stream keeps open, trying to load the results indefinitely. Even after I already destroyed the stream created by the compressor and released the database connection.

So, how can I force the compressor to end the stream ? 

I've attached a fiddle to show how thing goes. 

[EDIT]
I already tried to send back an empty array and setting the option "showEmptyData" to true, but no success

5 answers

Public
Vera Didenko Vera Didenko Flexmonster March 20, 2019

Hello, Allan Lima,

Thank you for writing to us and for providing us with a screenshot.

We have reproduced the problem you described using the compressor for Node.js.
Please let us know which server technology you are using the compressor for: .NET, .NET Core, Node.js, Java, or PHP.
We need this information to be able to determine the ETA of the fix.

We are looking forward to hearing from you.

Best Regards, Vera

Public
Allan Lima March 20, 2019

Hello, Vera
 
I'm using Node.js for server.
 
 

Public
Vera Didenko Vera Didenko Flexmonster March 21, 2019

Hello, Allan Lima,
 
Thank you for your reply.

We are currently working on a solution to the problem.
The fix will be available in the minor release with the ETA April 8.

 
Please let us know if you have further questions.
 
Best Regards,
Vera

Public
Allan Lima March 21, 2019

Hello, Vera!
I'll be waiting for the fix. For now, I'm sending back to flexmonster an ocsv to make it work
 
Thank you

Public
Vera Didenko Vera Didenko Flexmonster April 10, 2019

Hello, Allan Lima,

We are glad to announce that the issue with compressing empty streams in Node.js is resolved.
The fix is available on our website. 

You are welcome to update the component.

Best Regards,
Vera

Please login or Register to Submit Answer