I don't have an answer to your question but I have an alternative approach.
You always get a NextValidId event after you successfully connect so some people will just do nothing until they get NextValidId and then assume they are connected and continue with starting up the program.
toggle quoted message
Show quoted text
On 1/4/2016 11:00 AM, jasonl534@... [TWSAPI] wrote:
I don't understand why or how the API can think it's connected before I've granted the request.
Can anybody help me with this?