hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chi Shin Hsu <for.shin1...@gmail.com>
Subject Timeout exception caused by http 500 error
Date Fri, 04 Jan 2013 14:35:32 GMT
I'm trying using fluent client, but getting a strange issue.

Here is the pseudo code
-----------------------------------------
public String get(String url) throw Exception
{
   return .Get("http://somehost/")
        .connectTimeout(1000)
        .socketTimeout(1000)
        .execute().returnContent().asString();
}

int main()
{
   try
   {
   get("urlA");
   }
   catch(Exception e)
           e.printstack();

    try
   {
   get("urlB");
   }
   catch(Exception e)
           e.printstack();

}
-------------------------
Here is the problem

If I enter the first get function, get a http 500 exception.
Then get urlB , it would block until the socket timeout, and throw a
timeout exception.

urlB can be executed in front of urlA

Moreover, I traced the flow by wireshark.
The server actually send a response by urlB, but it still caused timeout
exception
any solution?

Thanks.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message