wait_queue: user can get removed and not informed
a user can be removed from queue but not get informed nor would her session be terminated. to simulate that get to the queue in one terminal and then do a rpa lock-state
the following will happen:
30560 2021-08-17 13:30.24.681272 <7>: Rpad.client_handler[10000:30978] new connection (pid=30978 uid=10000 gid=10000)
30560 2021-08-17 13:30.24.684693 <6>: command_handler: got line: lock
30560 2021-08-17 13:30.24.684794 <7>: Sched.spawn_mainloop:handle_request got NEED_LOCK: heinz (pid=30978 on since 2021-08-17 13:30.24)
30560 2021-08-17 13:30.24.684834 <7>: Sched.req_need_place found new user: heinz (pid=30978 on since 2021-08-17 13:30.24)
30560 2021-08-17 13:30.24.684864 <7>: msgchan_print: No host is currently free, added you to the wait queue.
30560 2021-08-17 13:30.24.684905 <7>: User.handle_user_output mesg for heinz (pid=30978 on since 2021-08-17 13:30.24): No host is currently free, added you to the wait queue.
30560 2021-08-17 13:30.28.247934 <7>: Rpad.client_handler[10000:30982] new connection (pid=30982 uid=10000 gid=10000)
30560 2021-08-17 13:30.28.251401 <6>: command_handler: got line: lock-state
30560 2021-08-17 13:30.28.251509 <7>: Sched.spawn_mainloop:handle_request got LOCK_STATE: heinz (pid=30982 on since 2021-08-17 13:30.28)
30560 2021-08-17 13:30.28.251543 <7>: msgchan_print: Info: You are currently HACKED.
30560 2021-08-17 13:30.28.251622 <7>: User.msgchan_close: run for heinz (pid=30982 on since 2021-08-17 13:30.28)
30560 2021-08-17 13:30.28.251663 <7>: User.handle_user_output mesg for heinz (pid=30982 on since 2021-08-17 13:30.28): Info: You are currently HACKED.
30560 2021-08-17 13:30.28.251694 <7>: User.handle_user_output done for heinz (pid=30982 on since 2021-08-17 13:30.28)
30560 2021-08-17 13:30.28.251725 <7>: Rpad.client_handler[10000:30982].och_closed called
30560 2021-08-17 13:30.28.251751 <7>: Rpad.client_handler[10000:30982].input_close_detector ich closed
30560 2021-08-17 13:30.28.251786 <7>: Rpad.client_handler[10000:30982].ich_closed called for heinz (pid=30982 on since 2021-08-17 13:30.28)
30560 2021-08-17 13:30.28.251808 <7>: Rpad.client_handler[10000:30982] completed
30560 2021-08-17 13:30.28.251828 <7>: Rpad.connection_handler ended for uid=10000 pid=30982
30560 2021-08-17 13:30.28.251920 <6>: Sched.abort_user(pid=30982): removed from queue: heinz (pid=30982 on since 2021-08-17 13:30.28)
as one can see the user is removed from the queue even though the pid does not match
this makes no sense, since even, if the new session would replace the old one, the old should be at least terminated
make sure that a running session is not affected by a lock-state
request