From c94a96f09463dc4a961392d60339f1d1ce5a2605 Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Mon, 29 Jan 2001 14:31:57 +0000 Subject: [PATCH] Prevent "Connection closed" message box from appearing after the "Network error" box. The latter on its own is enough. git-svn-id: http://svn.tartarus.org/sgt/putty@911 cda61777-01e9-0310-a592-d414129be87e --- window.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/window.c b/window.c index cef6825f..c1f3fac2 100644 --- a/window.c +++ b/window.c @@ -696,10 +696,12 @@ static void enact_pending_netevent(void) { if (cfg.close_on_exit) PostQuitMessage(0); else { - session_closed = TRUE; - MessageBox(hwnd, "Connection closed by remote host", - "PuTTY", MB_OK | MB_ICONINFORMATION); - SetWindowText (hwnd, "PuTTY (inactive)"); + if (!session_closed) { + session_closed = TRUE; + SetWindowText (hwnd, "PuTTY (inactive)"); + MessageBox(hwnd, "Connection closed by remote host", + "PuTTY", MB_OK | MB_ICONINFORMATION); + } } } } -- 2.45.2