mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-11-11 16:15:52 +00:00
$progressCallback should be called after a specific amount of data has been received and not, if its just requested, as the requested packets might be more as the available and received data.
This commit is contained in:
parent
00c9edc058
commit
b2ae60f0a9
@ -2309,9 +2309,6 @@ class Net_SFTP extends Net_SSH2
|
|||||||
}
|
}
|
||||||
$packet = null;
|
$packet = null;
|
||||||
$read+= $packet_size;
|
$read+= $packet_size;
|
||||||
if (is_callable($progressCallback)) {
|
|
||||||
call_user_func($progressCallback, $read);
|
|
||||||
}
|
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2341,6 +2338,9 @@ class Net_SFTP extends Net_SSH2
|
|||||||
} else {
|
} else {
|
||||||
fputs($fp, $temp);
|
fputs($fp, $temp);
|
||||||
}
|
}
|
||||||
|
if (is_callable($progressCallback)) {
|
||||||
|
call_user_func($progressCallback, $offset);
|
||||||
|
}
|
||||||
$temp = null;
|
$temp = null;
|
||||||
break;
|
break;
|
||||||
case NET_SFTP_STATUS:
|
case NET_SFTP_STATUS:
|
||||||
|
Loading…
Reference in New Issue
Block a user