X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/95587c73731bf686583ca49d6cc9f3157aa5e527..34580230cecf68453395e5698bb0176ab473748f:/pscp.c diff --git a/pscp.c b/pscp.c index a906303b..5f22828a 100644 --- a/pscp.c +++ b/pscp.c @@ -245,7 +245,7 @@ static int ssh_scp_recv(unsigned char *buf, int len) } while (outlen > 0) { - if (ssh_sftp_loop_iteration() < 0) + if (back->exitcode(backhandle) >= 0 || ssh_sftp_loop_iteration() < 0) return 0; /* doom */ }