Question

Sometimes I get EOFException when I try to open a TLS connection over Wi-Fi with

Connector.open("tls://sub.domain.com:443;deviceside=true;interface=wifi;EndToEndRequired");

The call to Connector.open() is blocking. The EOFException is thrown about 10 seconds after the call to Connector.open(). Currently, I am unable to check what happens on the server side.

Edit:
The call to Connector.open() is made from a thread that is NOT the main event thread. The problem appears on various devices that run OS 6, though I don't think the problem is OS specific.

Any thoughts on how to solve this or what can be causing the error?

Update:
At some occasions, the call to Connector.open() also yields a TLSAlertException wrapped inside TLSIOException. The exception is not thrown immediately, but rather after about 10 seconds as previously mentioned EOFException.

Était-ce utile?

La solution

Finally, I was able to capture the TLS handshake on the server side and I saw the following:

  1. Server received the Client Hello message
  2. Server responded with Server Hello message
  3. Client key exchange was not received from the client for about 10 seconds
  4. Server closed the connection with the client

Since I see no way to influence on the Connector.open() flow, the only thing I can do is retry (I never saw it happening twice in a row) after catching either EOFException or TLSAlertException (and possibly other TLS related exceptions).

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top