X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/fcbb94d3f7a319dcb2b1808e99e4c999be97b6ac..f317611e5572e4292e3ee88f6956a97fcd794089:/plink.c diff --git a/plink.c b/plink.c index 89b2f2c7..bee734fd 100644 --- a/plink.c +++ b/plink.c @@ -11,6 +11,7 @@ #define PUTTY_DO_GLOBALS /* actually _define_ globals */ #include "putty.h" +#include "winstuff.h" #include "storage.h" void fatalbox (char *p, ...) { @@ -511,6 +512,8 @@ int main(int argc, char **argv) { back->special(TS_EOF); } } + if (back->socket() == INVALID_SOCKET) + break; /* we closed the connection */ } WSACleanup(); return 0;