X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/0965bee0865fd8ea129b2de62a3c50e09c59a184..ded53fce5af6818acc2da88653b56c5c94377b8e:/window.c 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); + } } } }