>>>>> Ted Zlatanov wrote: >>> (defun gnus-server-close-all-servers () >>> "Close all servers." [...] KY> I can agree to this change if it is really helpful to you. But KY> you still need to type `C-g' for almost servers when the VPN is KY> disconnected, don't you? Even so, is it really helpful to you? KY> I don't have a problem like yours and don't know how to reproduce KY> it without VPN, so don't know how to solve it so far. > Yes, I need C-g, but I don't need to > 1) go to each opened server > 2) press C > 3) press C-g > (repeat 3-4 times for each foreign server that's hung) > now I just > 1) M-c > 2) press C-g for whatever hangs. > Much better user experience. Of course, avoiding the C-g would be even > better; my other question in the original e-mail was if I can tell Emacs > all these connections are truly dead so Gnus doesn't hang trying to > close them. I see. Though I've never looked into this problem throughly, the cause is often `accept-process-output' to which the timeout is not specified. So, I guess `nntp-wait-for-string' is the culprit (I have no idea for IMAP connections). To verify it, we probably need to remove all the `condition-case' forms and `ignore-errors' forms from nntp.el. But, er, it might be hard to do. How about deleting the processes immediately instead of quitting mannerly? The following patch forces Gnus to delete the nntp process if the server doesn't respond when Gnus tries to open it for sending the QUIT command: