This is potentially really hard for Riot to debug.
If it is in the client..
It's not like your login fails then you try again within the same process space and it magically works (i.e. some sort of debuggable state bug). The fact that you relaunch the entire process to fix it is extremely odd.
Under the hood, the application is establishing a TCP connection to the login infrastructure. These things tend to either work or not work (barring runnings out of file descriptors, which isn't out of the range of possibilities though extremely unlikely). This sort of problem is likely a concurrency bug which are absolutely nightmares to debug as if you attach a debugger, you slow things down, change timings, and magically things work.
But what if it is server side?
The more I think about it the more likely it seems this is a server side problem; something along the lines of the following (forgive the fact I chose Java to illustrate; it is the simplest for most to understand).
public boolean authenticate(final String user, final SecureCreds creds) {
SecureCreds actual = this.credCache.get(user);
if (actual == null) {
this.credCache.put(user, this.loadCredsFromDB(user));
}
// Throws null pointer exception as we didnt update actual with the
// return from the database.
return actual.equals(creds);
}
The next time this method gets invoked, the cache will return a non-null value and this will work (the cache probably has a cleanup on it which is why it happens again and again after awhile for the same user).
I am also well aware the code is probably significantly more complex than that and is chock full of technical debt and is probably nigh unreadable; I am merely highlighting a likely bug concept if this is a server side problem.