georgefst / monpad

A fully-customisable web-based gamepad, designed to be used from smartphones.
BSD 3-Clause "New" or "Revised" License
39 stars 5 forks source link

Reject duplicate usernames #34

Closed georgefst closed 3 years ago

georgefst commented 3 years ago

We can't merge this right now since we don't always/ever fire onDroppedConnection due to these issues:

Thus we don't actually delete from the set of active users, and therefore if a user tries to reconnect, they'll be rejected as the username will appear to be a duplicate.

Also note that the set is essentially unused in serverExtWs (even though we initialise it with users <- newMVar Set.empty since it's never added to. Perhaps we can refactor.

georgefst commented 3 years ago

This will need rebasing after 957ff5e, to become part of validateUsername.