This is a corner case for the issue addressed here: https://github.com/mennanov/limiters/issues/29.
This occurs when the version fetched by State() is deleted before SetState() is executed. That will cause an error: got [1 1 OK OK] from redis, expected [<version_before_remove>+1 1 OK OK] raised by checkResponseFromRedis.
This is a corner case for the issue addressed here: https://github.com/mennanov/limiters/issues/29. This occurs when the version fetched by
State()
is deleted beforeSetState()
is executed. That will cause an error:got [1 1 OK OK] from redis, expected [<version_before_remove>+1 1 OK OK]
raised bycheckResponseFromRedis
.Potential solution is to always expect version to be in initial state: https://github.com/mennanov/limiters/pull/42