diff --git a/src/SocketTrait.php b/src/SocketTrait.php index 756e37c..cfa2461 100644 --- a/src/SocketTrait.php +++ b/src/SocketTrait.php @@ -62,7 +62,10 @@ trait SocketTrait if (false === $socket) { throw new ClientException('Unable to establish socket session, ' . $this->_socket_err_str); } - + + //Timeout read + stream_set_timeout($socket, $this->config('timeout')); + // Save socket to static variable $this->setSocket($socket); }