sqlanywhere / node-sqlanywhere

SAP SQL Anywhere Database Client for Node
Apache License 2.0
39 stars 36 forks source link

conn.disconnect() crashes Nodejs #19

Closed LexDias closed 8 years ago

LexDias commented 8 years ago

This problem occurs on v1.0.10 and it was explained before at this issue.

It was corrected on v.1.0.11.

I've downloaded v.1.0.12 and the problem mentioned at returned. Any ideas?

gperrow-SAP commented 8 years ago

It's a different issue but the same result. We are crashing because you are calling the disconnect method inside the callback from exec. This is a perfectly valid thing to do but we're not handling it well. In addition, the automated tests I wrote to check for this were incomplete. Until I get a fix in place, you can put the conn.disconnect() inside a call to process.nextTick() and that will clean it up.

gperrow-SAP commented 8 years ago

This is fixed in v1.0.13.

LexDias commented 8 years ago

Worked fine! Thanks a lot!