From bbed0916cd307c373a291b6fce8bc12d87ab95ad Mon Sep 17 00:00:00 2001 From: terrafrost Date: Fri, 11 Jan 2013 18:38:38 -0600 Subject: [PATCH] SSH2: Make $stop be after all network activity --- phpseclib/Net/SSH2.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpseclib/Net/SSH2.php b/phpseclib/Net/SSH2.php index c0d5c478..0bb85abb 100644 --- a/phpseclib/Net/SSH2.php +++ b/phpseclib/Net/SSH2.php @@ -2036,7 +2036,6 @@ class Net_SSH2 { $start = strtok(microtime(), ' ') + strtok(''); // http://php.net/microtime#61838 $raw = fread($this->fsock, $this->decrypt_block_size); - $stop = strtok(microtime(), ' ') + strtok(''); if (empty($raw)) { return ''; @@ -2059,6 +2058,7 @@ class Net_SSH2 { $buffer.= $temp; $remaining_length-= strlen($temp); } + $stop = strtok(microtime(), ' ') + strtok(''); if (!empty($buffer)) { $raw.= $this->decrypt !== false ? $this->decrypt->decrypt($buffer) : $buffer; $buffer = $temp = '';