When verifying against multiple OTP servers, the caller may exit before other threads finish, and as a result, will call an invalid channel Sender that no longer exists and panic.
This is due to how (according to spec) it sends out 5 requests simultaneously to the default YubiCloud servers, and if one of the threads returns that the OTP is ok, it will immediately return the result to calling code. Unfortunately, after the verify caller exits, the other threads will still be alive and will receive responses and attempt to send then back to the caller through a channel that no longer exists and will panic.
A way to tackle it would be forcibly quitting all other threads once one has returned successfully.
@Step7750 I published a new version with a fix. Thank you for reporting it.
I will read the spec again when I have more time and change a bit the way the lib is handling the responses.
When verifying against multiple OTP servers, the caller may exit before other threads finish, and as a result, will call an invalid channel
Sender
that no longer exists and panic.This is due to how (according to spec) it sends out 5 requests simultaneously to the default YubiCloud servers, and if one of the threads returns that the OTP is ok, it will immediately return the result to calling code. Unfortunately, after the verify caller exits, the other threads will still be alive and will receive responses and attempt to send then back to the caller through a channel that no longer exists and will panic.
A way to tackle it would be forcibly quitting all other threads once one has returned successfully.