1
0
mirror of https://github.com/danog/tgseclib.git synced 2024-11-26 20:24:39 +01:00

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; $this->bitmap = 0;
fclose($this->fsock); if (is_resource($this->fsock) && get_resource_type($this->fsock) == 'stream') {
fclose($this->fsock);
}
return false; return false;
} }