- Tue Dec 19, 2017 7:28 am
#72581
Hi,
I don't see anything in the documentation either. I don't have the definitive answer to this, but how about this:
- register a connection callback before calling espconn_connect() (I assume you already do this)
- also set up a timer callback for whatever time you want as your connection timeout. Pass the espconn struct pointer as argument to the timer callback
- in the connect callback, disarm the timer
- if you get to the timer callback, you know that the connection has timed out. Call espconn_disconnect() or espconn_abort() to abort the connection.
Don't know if it works to call abort() on a connection that hasn't been established, but since nobody else has suggested anything better perhaps it is worth trying
. Good luck.