jbmusso / gremlin-javascript

JavaScript tools for graph processing in Node.js and the browser inspired by the Apache TinkerPop API
MIT License
214 stars 63 forks source link

Handle orphaned/malformed responses #73

Closed princjef closed 7 years ago

princjef commented 7 years ago

Addresses the issue in #67 by emitting a warning message whenever a message is received on the socket with no associated request messageStream to handle it. Also handles malformed message payloads.

A comment on design: While there is an error underlying this message, it doesn't have the same ramifications as a standard error that is emitted when the client connection has a problem. For one, it shouldn't close the connection. On top of that, if a client doesn't listen for 'error' node will throw. I'm open to using something other than 'warning', but I'd rather not use 'error' for these reasons.

coveralls commented 7 years ago

Coverage Status

Changes Unknown when pulling 50c5b76cf6112203b7cd0f13e79cb13cd8096582 on princjef:orphaned-response into on jbmusso:master.

coveralls commented 7 years ago

Coverage Status

Changes Unknown when pulling 840710ce6bb15a0b151382579d4033f61b902ee3 on princjef:orphaned-response into on jbmusso:master.

coveralls commented 7 years ago

Coverage Status

Changes Unknown when pulling 840710ce6bb15a0b151382579d4033f61b902ee3 on princjef:orphaned-response into on jbmusso:master.

coveralls commented 7 years ago

Coverage Status

Changes Unknown when pulling c336705994815edef2c611cf9294e14fd5bb4a0a on princjef:orphaned-response into on jbmusso:master.

coveralls commented 7 years ago

Coverage Status

Changes Unknown when pulling 724b2fbd08f82d73c2d6d18be7ea362a240b1407 on princjef:orphaned-response into on jbmusso:master.

coveralls commented 7 years ago

Coverage Status

Changes Unknown when pulling 0f900bbfd49d3e69285cc2e5b87fa4edf138da85 on princjef:orphaned-response into on jbmusso:master.

jbmusso commented 7 years ago

Thanks for that one too! I'm still wondering about the Babel thing, but I need to find some time to checkout your PR and see what's going on.

guyellis commented 7 years ago

@jbmusso Do you have an update on this and other PRs that are waiting? Is there anything that I (or someone else) can help with in testing or reviewing them?

jbmusso commented 7 years ago

It's all good to me!

dragma commented 7 years ago

After 48h of live test on a production website, it appears that the new module version (that includes this PR merged) makes my application no longer randomly crash. Thanks a lot guys, really. Florent

jbmusso commented 7 years ago

Thanks for the feedback @dragma, appreciate that it's running fine!