noodlefrenzy / node-amqp10

amqp10 is a promise-based, AMQP 1.0 compliant node.js client
MIT License
134 stars 56 forks source link

Only write stream if stream exists #323

Closed jtjk closed 6 years ago

jtjk commented 7 years ago

https://github.com/noodlefrenzy/node-amqp10/issues/322

Not so elegant workaround to fix linked issue


This change is Reviewable

jtjk commented 6 years ago

Any comments to this?

pierreca commented 6 years ago

@jtjk I think the problem is in the state machine rather than in the call to stream.write(), this would just swallow an error that at this point is perfectly legitimate (albeit annoying). Not denying there might be a bug, just saying this probably isn't the right way to fix it, therefore i'm closing the PR but feel free to reopen it if you want to discuss it further.