Closed igroglaz closed 4 months ago
A negative value for fd in remove_input() provokes an exit(1) which stops the server immediately. As for why this happened... I have absoletely no idea :(
Try to put a breakpoint on the "plog_fmt("remove illegal input handler fd %d", fd);" line in sched-win.c, if the problem happens again you will have the call stack to see where the problem comes from. In that case post a short video on your YT channel like you always do so we can investigate further.
Could happen randomly if the user presses Q to quit at the same time the input handler processes the quit packet. The do_quit() method is called twice, closes the socket and then tries to close it again generating a useless error message. Just need to add a check so that if the socket is already closed do_quit just does nothing.
(easily spotted on the video because the quit_msg of the connp is already set to "Client quit" meaning the player already pressed Q and the game is waiting for the 5 second timeout to complete to log off the character)
Fixed in commit 66b64bb.
server stopped without exit_game_panic(void):
no more logs.