Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
IMAP - debug a EIdSocketError # 10060 connection timeout error under a complex env.
#1
Exclamation 
My multi-threaded program uses TidIMAP4 to access Gmail's IMAP server with OAuth 2 authentication. 

My computer's network environment is a little complex - here we have the GFW blocking overseas services including Gmail, so the program connects through OpenVPN(through stunnel) and ShadowSocks proxy.


The setup works for other programs including Chrome, etc.

With the setup my program's thread 2 had several successful login, but most of the time, it fails to connect with the 'EIdSocketError: Socket Error # 10060 Connection timed out.' error.

With TIdLogEvent I can see that there is no data coming in and out. And this is thread 2, but thread 1 is ok - it can connect, login, select mailbox, and so on.

the logic works like this: thread 1 login and download folder/label list, email IDs, and so on, when done, it pushes the downloaded data to a queue and several instances of 'thread 2' will start to login. And the above described error happens in 'thread 2'.

I know the issue might come from the GFW, but the strange thing is why 'thread 1' can login but 'thread 2' fails? They login with the same function and same parameters.

I intend to diagnose with Wireshark, but don't know how to setup after trying many kinds of setup.

Any hints or suggestions? Thanks.

PS, the program most of the time works with direction Internet connection on a remote windows VPS which is located in the US, but still sometimes it gets the "EIdReplyIMAP4Error" exception
Reply


Messages In This Thread
IMAP - debug a EIdSocketError # 10060 connection timeout error under a complex env. - by edwinyzh - 10-27-2018, 01:41 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)