Questions tagged [socket-timeout-exception]

Signals that a timeout has occurred on a socket read or accept.

These exceptions are often occurring in a Java Platform, so read more in:

Class SocketTimeoutException

235 questions
0
votes
1 answer

HttpURLConnection readLine() hanging on Sprint 4G network

I have a routine that uses a HttpURLConnection to upload a file via a multipart/form-data content type. The server does some processing on the uploaded file and returns a short response code. This works fine in all cases so far except with one…
Andrew
  • 141
  • 4
  • 14
0
votes
2 answers

Is it possible to reuse a socket after a TimedOut exception?

Simply put, is it possible to reuse a socket after a TimedOut exception has been caught? How can I do it? Long story: I have 2 threads, both using the same socket. One is sending packets (let's call it thread A) to a remote server while the other…
rfgamaral
  • 15,937
  • 49
  • 156
  • 269
0
votes
2 answers

SocketTimeoutException when ConnectTimeout and ReadTimeout is infinite?

Possible Duplicate: Receiving request timeout even though connect timeout and read timeout is set to default (infinite)? I tried to connect to a web service and received a SocketTimeoutException after approximately 20 seconds. The Tomcat server…
Arci
  • 6,327
  • 20
  • 65
  • 95
-1
votes
1 answer

Error SocketTimeoutException connecting to google in android

i'm having a problem with the connection for my app (Android). I'm using the following code to check if i have internet connection. ConnectivityManager cm = (ConnectivityManager)context …
-1
votes
1 answer

Exception "java.net.ConnectException: Connection timed out: connect" is thrown before specified timeout

I have following code: import java.io.IOException; import java.net.InetSocketAddress; import java.net.Socket; public class ScoketTimeoutMain { public static void main( String[] args ) { Socket socket = new Socket(); …
Mariusz
  • 1,661
  • 3
  • 21
  • 35
-1
votes
2 answers

Stop Socket with timeout from waiting after data read from socket

I am trying to create a java http server using tcp sockets. HTTP 1.1 has a timeout value that will enable the connection to be persistent and wait for a short while for possible data from the client. I am trying to implement this timer in my program…
Donald
  • 1,180
  • 2
  • 10
  • 27
-1
votes
1 answer

No connection timeout for sun SSLSocketImpl, potential bug?

Recently we met SocketTimeoutException when the client application connecting to server. The client app utilized Axis1.4 as the SOAP engine. We already set the connection timeout and read timeout as 20 seconds for socket, but it looks like the…
zgcharley
  • 1,047
  • 3
  • 17
  • 24
-1
votes
2 answers

SocketTimeoutException while readFully

I have below code which throws SocketTimeoutException. Socket socket = new Socket(localhost, 9978); socket.setSoTimeout(10000); OutputStream oStream= socket.getOutputStream(); byte[] data = new byte[] {'h', 'e', 'l', 'l',…
Arjun Patel
  • 335
  • 6
  • 22
-1
votes
1 answer

Android always SocketTimeoutException

Sometimes I get into a state in which I always get SocketTimeoutException. Application restart does not work. Only phone restart works. What can be the cause and fix? I am running the app on an Android 4.3 Nexus 4 btw.
-2
votes
2 answers

Getting UnknownHostException instead of SocketTimeOutExcepetion

I am new to android and Java. And I am trying to learn android app development from UDACITY. I was trying to run this code and I am expecting a SocketTimeOutExcepetion but what I am getting is UnknownHostException. try { final String BASE_URL =…
1 2 3
15
16