mangopay2-java-sdk
mangopay2-java-sdk copied to clipboard
com.mangopay.core.RestTool#doRequestList does not set any timeouts
while com.mangopay.core.RestTool#doRequest does set connection and readtimeout, doRequestList does not. we had the problem that one of our cronjobs to load open events was hanging while trying to read for the first time from the connection (retrieving the response code)
we run with version 2.20.0 but i also checked 2.27.0 but there is the same
see sample
[email protected]/java.net.SocketInputStream.socketRead0(Native Method)
[email protected]/java.net.SocketInputStream.socketRead(SocketInputStream.java:115)
[email protected]/java.net.SocketInputStream.read(SocketInputStream.java:168)
[email protected]/java.net.SocketInputStream.read(SocketInputStream.java:140)
[email protected]/sun.security.ssl.SSLSocketInputRecord.read(SSLSocketInputRecord.java:478)
[email protected]/sun.security.ssl.SSLSocketInputRecord.readHeader(SSLSocketInputRecord.java:472)
[email protected]/sun.security.ssl.SSLSocketInputRecord.decode(SSLSocketInputRecord.java:160)
[email protected]/sun.security.ssl.SSLTransport.decode(SSLTransport.java:111)
[email protected]/sun.security.ssl.SSLSocketImpl.decode(SSLSocketImpl.java:1506)
[email protected]/sun.security.ssl.SSLSocketImpl.readHandshakeRecord(SSLSocketImpl.java:1416)
[email protected]/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:456)
[email protected]/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:427)
[email protected]/sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:572)
[email protected]/sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:201)
[email protected]/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1592)
[email protected]/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1520)
[email protected]/java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:527)
[email protected]/sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:334)
com.mangopay.core.RestTool.doRequestList(RestTool.java:589)
com.mangopay.core.RestTool.requestList(RestTool.java:229)
com.mangopay.core.APIs.ApiBase.getList(ApiBase.java:363)
com.mangopay.core.APIs.ApiBase.getList(ApiBase.java:368)
com.mangopay.core.APIs.implementation.EventApiImpl.get(EventApiImpl.java:29)