Closed 0xabadea closed 10 years ago
You can declare a timeout with the constructor public PaymillContext( final String apiKey, Integer timeout ). Have you tried that?
Aaah. Sorry -- I hadn't noticed there was a new version of the library. My comment referred to version 2. I'll give v3 a look.
There are some changes in v3 but i highly recommend you to update, as we cannot support v2 any longer. There is no way to configure the timeout in v2, unless of course you do it yourself. The correct place for this is the createConnection method in the HttpClient class.
This is a continuation of issue #40.
There still does not seem to be a way to override the timeout of the HTTP connections. It is set to the default (zero) which the Javadoc of URLConnection promises to be "infinity". I see no way in which this is reasonable. The default timeout should be a reasonably small value such as a minute, and there should be a way to override it.