Help save net neutrality! Learn more.

Setting timeout after connect in HTTPRequet.j

Hao Hu
  • Hao Hu

    Hao Hu - 2011-02-11

    Hello everyone,
    I found a problem in Inside the mehtod public HTTPResponse post(String host, int port, boolean isKeepAlive). I think the setting timeout too late, and it should not set after the postSocket = new Socket(host, port); I read the jdk source code, when the socket is created with address and port, the connection will be automatically established. So I think the timeout should be set before socket connecting. Am I right? Thanks for any tips and help.


Log in to post a comment.