Reading the access token sometimes hangs #311

Closed
EPILock opened this Issue Oct 4, 2012 · 1 comment

Projects

None yet

2 participants

@EPILock

Getting smth like this:
java.lang.Thread.State: RUNNABLE
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:129)
at com.sun.net.ssl.internal.ssl.InputRecord.readFully(InputRecord.java:293)
at com.sun.net.ssl.internal.ssl.InputRecord.readV3Record(InputRecord.java:405)
at com.sun.net.ssl.internal.ssl.InputRecord.read(InputRecord.java:360)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:798)
- locked <1464a4e7> (a java.lang.Object)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1138)
- locked <5b864426> (a java.lang.Object)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1165)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1149)
at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:434)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:166)
at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:1014)
- locked <78a4bae9> (a sun.net.www.protocol.https.DelegateHttpsURLConnection)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:230)
- locked <48eea61d> (a sun.net.www.protocol.https.HttpsURLConnectionImpl)
at org.scribe.model.Request.addBody(Request.java:97)
at org.scribe.model.Request.doSend(Request.java:82)
at org.scribe.model.Request.send(Request.java:59)
at org.scribe.model.OAuthRequest.send(OAuthRequest.java:1)
at org.scribe.oauth.OAuth20ServiceImpl.getAccessToken(OAuth20ServiceImpl.java:36)
at ru.shopogoliq.controller.oauth.OAuthController.doProcess(OAuthController.java:48)

Requesting posibility to set OAuthRequest timeouts inside OAuth20ServiceImpl.getAccessToken

@fernandezpablo85

Now timeout defaults to 2 seconds for both token calls and there's also an overloaded version of the method that let's you specify the timeout you want:

09d85d6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment