Add constants for ftp connections timeouts, props dd32, see #10522

git-svn-id: https://develop.svn.wordpress.org/trunk@11823 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Ozz
2009-08-15 12:01:04 +00:00
parent 5e8dbc10cd
commit 10cd9df0ae
4 changed files with 19 additions and 14 deletions
@@ -45,14 +45,6 @@ class WP_Filesystem_SSH2 extends WP_Filesystem_Base {
var $link = false;
var $sftp_link = false;
var $keys = false;
/*
* This is the timeout value for ssh results.
* Slower servers might need this incressed, but this number otherwise should not change.
*
* @parm $timeout int
*
*/
var $timeout = 15;
var $errors = array();
var $options = array();
@@ -148,7 +140,7 @@ class WP_Filesystem_SSH2 extends WP_Filesystem_Base {
$this->errors->add('command', sprintf(__('Unable to perform command: %s'), $command));
} else {
stream_set_blocking( $stream, true );
stream_set_timeout( $stream, $this->timeout );
stream_set_timeout( $stream, FS_TIMEOUT );
$data = stream_get_contents( $stream );
fclose( $stream );