node-sync icon indicating copy to clipboard operation
node-sync copied to clipboard

Hangs on block

Open shadowcodex opened this issue 9 years ago • 1 comments

So I created a function, and I call it with sync. However the program completely blocks and won't move past that call. The call finishes and it just sits.

Once I remove sync then it moves forward.

I am trying to call this function which in turn calls 20 or so https requests, and database connections. When they all finish I want to close the database connection (it is persistent until closed (elastic search)). However it never reaches the client.close() and thus the process never ends.

Ideas?

shadowcodex avatar Jul 02 '15 22:07 shadowcodex

Can you provide code examples of calling this function with/without sync?

ybogdanov avatar Jul 03 '15 02:07 ybogdanov