Skip to content
This repository has been archived by the owner on Dec 14, 2023. It is now read-only.

Commit

Permalink
Merge pull request #6 from sergekv/patch-1
Browse files Browse the repository at this point in the history
Fix bug with stream timeout
  • Loading branch information
StephenHynes7 committed May 31, 2016
2 parents 9df333d + 2498cda commit f3391fb
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/Logentries/Socket.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ class Socket
private $port;
private $connectionTimeout;
private $resource;
private $timeout = 0;
private $errno;
private $errstr;

Expand Down Expand Up @@ -96,8 +95,8 @@ private function fwrite($data)

private function streamSetTimeout()
{
$seconds = floor($this->timeout);
$microseconds = round(($this->timeout - $seconds) * 1e6);
$seconds = floor($this->connectionTimeout);
$microseconds = round(($this->connectionTimeout - $seconds) * 1e6);

return stream_set_timeout($this->resource, $seconds, $microseconds);
}
Expand Down

0 comments on commit f3391fb

Please sign in to comment.