Kong / unirest-java

Unirest in Java: Simplified, lightweight HTTP client library.
http://kong.github.io/unirest-java/
MIT License
2.58k stars 591 forks source link

Hi Team, Kong unirest , post method I am calling every request Unirest.reset(). connectionTimeout(600000). enableCookieManagement(false): Unirest.post("http://127.0.0.1").asJson();. After continues different api call I'm getting socket exception : socket closed and some time I got illicalstateexception connection pool shutdown Balaji Arumugam 17:31 Kindly correct me. If I am doing wrong configuration #422

Closed Barumugam3 closed 2 years ago

Barumugam3 commented 2 years ago

Describe the bug A clear and concise description of what the bug is.

To Reproduce Steps to reproduce the behavior:

  1. Provide as much of a code sample as possible. Unirest is pretty small so it you should be able to mostly copy-paste into the issue
  2. do NOT paste authentication or client keys into the issue
  3. provide full stack traces if possible

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

Environmental Data:

Additional context Add any other context about the problem here.

ryber commented 2 years ago

You shouldn't be resetting the connection over and over again, the configuration on an instance should be fairly static. Any time you call reset() you are going to end up closing the existing pool

ryber commented 2 years ago

duplicate of https://github.com/Kong/unirest-java/issues/127