new input method for client, now CTRL+D always works
fixed deadlock while quitting