Comments (10)
No, we only want to refresh/update the access token once, that is why that part is synchronized.
We have to wait until it's refreshed or we can't update, anyway.
Could you explain what kind of problems you're getting with it?
from eve-esi.
The synchronized block should start at
and use the AccessTokenData of that connection only.
We can do that change after #75 as everything is prepared already.
@eve-gatt Do you use the library in production?
from eve-esi.
I'm going to look into this.
I think we need a stronger link between the refresh token and the access token, and the updating of both
from eve-esi.
No, we only want to refresh/update the access token once
Yeah, that makes sense, but that synchronized block means that only 1 thread can update any access token at a time doesn't it?
Could you explain what kind of problems you're getting with it?
Yeah, I suspect the http call is never returning and so all my other threads get queued behind it. I'm trying this for now to see if it helps:
con.setConnectTimeout(10000);
con.setReadTimeout(10000);
@eve-gatt Do you use the library in production?
In that I've got about 40 or so corpies using it daily, yes.
from eve-esi.
Specifically, the error I got at 03:17 this morning was:
WARNING: Thread Thread[worker-pilot-tracker-5,5,main] has been blocked for 60090 ms, time limit is 60000 ms
io.vertx.core.VertxException: Thread blocked
at net.troja.eve.esi.auth.OAuth.getAccessTokenData(OAuth.java:118)
at net.troja.eve.esi.auth.OAuth.applyToParams(OAuth.java:47)
at net.troja.eve.esi.ApiClient.updateParamsForAuth(ApiClient.java:834)
at net.troja.eve.esi.ApiClient.invokeAPI(ApiClient.java:711)
at net.troja.eve.esi.api.LocationApi.getCharactersCharacterIdLocation(LocationApi.java:93)
from eve-esi.
Default Timeout is very likely 300s, so that connection just returns very late, but too late for vertx.
I hope your timeout changes work as expected!
The change to OkHttp probably also helps in this case.
from eve-esi.
I thought the default timeout was 0, i.e. infinity. The vertx part is just a warning and I could extend that if there was a valid case for a thread taking > 1min. Let's see how setting an explicit timeout works. Unfortunately this occurs so infrequently that it's difficult to test. I'm not even sure how to simulate it.
from eve-esi.
So I would just say lets wait for it and if it still exists, try another fix.
Simulating it would mean you have to drop or slow down those special packages but I think that's way too complicated.
from eve-esi.
Work-in-progress PR (#79) up for this.
from eve-esi.
Released in 3.0.0
from eve-esi.
Related Issues (20)
- Difference b/w Structure and Station for Market Orders? HOT 2
- JWT payload parsing fails if there were no scopes selected HOT 3
- OAuth doesn't support a way to get/set codeVerifier string HOT 3
- How can I get the characterID after auth success HOT 2
- Issue with getting new Auth key HOT 9
- Retrying Eve SSO (RetryingOAuth) using Refresh Token HOT 10
- Contradiction: condition never becomes true (dead code)
- Setting a custom OkHttpClient doesn't get the interceptors set for async calls
- Using SsoAuthTest to get tokens
- SSO changes by November 1
- Endpoint Version 4 of /characters request returns 404 HOT 8
- Getting an internal server error when calling POST /characters/{character_id}/assets/names/ HOT 2
- Update to latest codegen (6.6.0)
- Update access token on scheduled task
- Use the latest version of codegen HOT 2
- Stuck at the Beginning HOT 4
- Bad Gateway HOT 4
- getting 420's HOT 1
- automatic retries HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from eve-esi.