Closed JacobSweeten closed 3 years ago
Hi @JacobSweeten thank you for the report. I have not experience this myself using this module, and not sure what the cause would be. Can you provide a reproduction case that I can run and reproduce the issue you are experiencing? Please provide a full script and instructions for how to run it to see the issue. I can then attach a debugger to determine what is happening. I also see you are already comfortable using a debugger, so if you are not comfortable sharing the code to reproduce the issue, if you can put together a pull request for the fix, that would be appreciated as well!
My apologies. I misunderstood the problem. Turns out, I had a while loop with the wrong exit condition. I assumed the while loop wasn't even running because I forgot to add a return after a reject() call. Not sure why it resulted in recursion as while loops are the opposite of recursion, but whatever. Thank you for your assistance.
I figured it out by stepping a bunch of times through the debugger. Eventually, it came back to my while loop which I did not expect.
My Code:
Result:
In the above debugger log, I attempted a connection to the API after issuing the debugger command "c" which causes checkUserIDExists() to be called. The "User exists" is correct and expected.
What is strange is that the function completes and so does its calling function, but some asynchronous function is still running, probably recursively, taking up memory and processing power.
Eventually, it crashes. With debugger:![image](https://user-images.githubusercontent.com/11415022/117054865-2b0f3200-ace0-11eb-99eb-a6969e580c89.png)
Without debugger:![image](https://user-images.githubusercontent.com/11415022/117055124-690c5600-ace0-11eb-8cb6-638e0a8fff27.png)
Thank you, Jacob Sweeten