SSH2: only do fclose($this->fsock) if doing so won't yield error

This commit is contained in:
terrafrost 2019-09-16 07:55:47 -05:00
parent db324e5d01
commit cd21287ebc

View File

@ -4157,7 +4157,9 @@ class Net_SSH2
}
$this->bitmap = 0;
fclose($this->fsock);
if (is_resource($this->fsock) && get_resource_type($this->fsock) == 'stream') {
fclose($this->fsock);
}
return false;
}