Skip to content

Commit

Permalink
Merge branch 'master' of github.com:roundcube/roundcubemail
Browse files Browse the repository at this point in the history
  • Loading branch information
thomascube committed May 16, 2013
2 parents 31996f1 + 0bd1fa5 commit 3bc871e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion program/lib/Net/Socket.php
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,12 @@ function setTimeout($seconds = null, $microseconds = null)
$this->timeout = $seconds + $microseconds/1000000;
}

return stream_set_timeout($this->fp, (int) $seconds, (int) $microseconds);
if ($this->timeout > 0) {
return stream_set_timeout($this->fp, (int) $seconds, (int) $microseconds);
}
else {
return false;
}
}

/**
Expand Down

0 comments on commit 3bc871e

Please sign in to comment.