SSH2: setTimeout(0) didn't work as intended

This commit is contained in:
terrafrost 2018-12-16 11:44:58 -06:00
parent 363ffc9cfd
commit a9c0e2d430

View File

@ -3785,7 +3785,12 @@ class Net_SSH2
$response = $this->binary_packet_buffer; $response = $this->binary_packet_buffer;
$this->binary_packet_buffer = false; $this->binary_packet_buffer = false;
} else { } else {
if ($this->curTimeout) { $read = array($this->fsock);
$write = $except = null;
if (!$this->curTimeout) {
@stream_select($read, $write, $except, null);
} else {
if ($this->curTimeout < 0) { if ($this->curTimeout < 0) {
$this->is_timeout = true; $this->is_timeout = true;
return true; return true;