If I have a socket like so:

boost::asio::ip::tcp::socket tcpSocket;

and call connect in a boost::thread like so:

tcpSocket.connect(endPoint, error);

It will 'hang' for up to 30 seconds if it can't immediately connect to the end point.

If I interrupt() and join() the boost thread it has to wait for the connect() call to finish.

Is there a way to cancel or interrupt the connect() call?

Thanks

Simon