From d3185a40a091471d94ba3b97a663b5059d337812 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. [originally from svn r911] --- 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); + } } } }