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;
|
||||
$read+= $packet_size;
|
||||
if (is_callable($progressCallback)) {
|
||||
call_user_func($progressCallback, $read);
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
|
||||
@ -2341,6 +2338,9 @@ class Net_SFTP extends Net_SSH2
|
||||
} else {
|
||||
fputs($fp, $temp);
|
||||
}
|
||||
if (is_callable($progressCallback)) {
|
||||
call_user_func($progressCallback, $offset);
|
||||
}
|
||||
$temp = null;
|
||||
break;
|
||||
case NET_SFTP_STATUS:
|
||||
|
Loading…
Reference in New Issue
Block a user