browser
browser copied to clipboard
Ensure completions are executed on the currently connected client
For the time being, given that we only allow 1 client at a time, I took a shortcut to implement this. The server has an incrementing "current_client_id" which is part of every completion. On completion callback, we just check if its client_id is still equal to the server's current_client_id.