diff --git a/pssh/clients/native/single.py b/pssh/clients/native/single.py index 9757fb40..30d48102 100644 --- a/pssh/clients/native/single.py +++ b/pssh/clients/native/single.py @@ -707,7 +707,7 @@ def _scp_recv(self, remote_file, local_file): local_fh.write(data) while total < fileinfo.st_size: size, data = file_chan.read(size=fileinfo.st_size - total) - while size == LIBSSH2_ERROR_EAGAIN: + if size == LIBSSH2_ERROR_EAGAIN: wait_select(self.session) continue total += size