penguineer / Rabbarkable

RabbitMQ (AMQP) connector for the reMarkable API
https://hub.docker.com/r/mrtux/rabbarkable
MIT License
5 stars 0 forks source link

:bug: Check if there are race conditions when user token is renewed #3

Closed penguineer closed 2 years ago

penguineer commented 2 years ago

The user token is renewed every 6 hours, but due to the asynchronous nature of the implementation there might be requests with the old and renewed token in parallel.

Check if this is a problem or if there can indeed be multiple tokens at the same time.

penguineer commented 2 years ago

There seems to be no problem with multiple user tokens (tested by accidentally having two).

There is another issue tho: When the token is expired, it takes a while to retrieve a new one. In this time other (parallel) requests will also issue a user token. Some synchronization might be beneficial here.

penguineer commented 2 years ago

The problem #5 still exists, but multiple tokens do not seem to be a problem.