We have multiple servers that access Box, so we turn off auto-refresh.
connect.setMaxRequestAttempts(1);
connect.setAutoRefresh(false);
Assumptions gathered from unit tests:
Given that, it appears you can have multiple readers with one writer updating the token pair, even if a reader gets the previous token pair, it should be fine (for access).
We ensure that only one thread in the system updates the tokens, but yet are having issues with 401 errors in spite of locking down the token updates. It seems there something wrong with the assumptions above.
答案 0 :(得分:1)
你的假设很接近。这是预期的行为: