ctm / mb2-doc

Mb2, poker software
https://devctm.com
7 stars 2 forks source link

Client never shares warnings #1455

Open ctm opened 2 days ago

ctm commented 2 days ago

Add a primitive, but rate limited, mechanism for the client to send warnings to the server.

Inertia and letting perfect strangle good in its sleep have let me get five years into this project without the client telling the server when it's detected something amiss. That has worked surprisingly well, but will not scale. I have not been able to reproduce the panic I got yesterday morning (#1454). As such, I've textually searched the code for .unwind( and .expect( and found a few that I'll change into warn! invocations, but that will just change a panic into incorrect and unreported behavior.

So, it makes sense to replace all log::warn! and log::error! messages with something that sends info to the server if it can and writes to local-storage for sending later if it can't. It does not need to be sophisticated, but it does need to be rate-limited so that a recurring error won't cause more trouble than the original error(s).