On 5 янв, 00:21, Kostya Vasilyev <kmans...@gmail.com> wrote: > Ivan, > > Try the following: > > - Use socket.connect(SocketAddress endpoint, int timeout). > - Catch SocketTimeoutException around connect() and use it to retry > (after a delay). > > It provides no benefit to try and keep the same Java object (socket), > since the underlying TCP/IP data connection won't be there until the > connection is established.
After first attempt of "socket.connect(...)" throws SocketTimeoutException Next attempts throws java.net.SocketException: The socket argument is not a valid file descriptor -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en