Closed bsdelf closed 2 years ago
Thanks for reporting. The state should be guarded against so I'll investigate. What version of nsqjs are you using?
We are using:
I believe this issue has been resolved in 0.13.0
with the removal of setImmediate
use in write
:
https://github.com/dudleycarr/nsqjs/commit/219888385f51c20bcacbdc588f576d32253accdc
Could you please upgrade to 0.13.0
and see if that resolves the issue?
Thanks, unfortunately our property code is freezed at this moment, I have to try it in next release.
Seems it's OK to close this issue now, if it happens again I will reopen it.
We found following log on server:
the related code block in nsqjs is:
As nodejs documented (https://nodejs.org/api/errors.html#err_stream_write_after_end ), the error is caused by writing to an ended stream.
Since the uncaught exception is raised in nsqjs, there is no chance for our application to handle it gracefully. So I'm thinking, is it possible to add a try-catch block in nsqjs to handle this kind of error properly?