|
|
@@ -11,6 +11,7 @@
|
|
|
* @link http://www.workerman.net/
|
|
|
* @license http://www.opensource.org/licenses/mit-license.php MIT License
|
|
|
*/
|
|
|
+declare(strict_types=1);
|
|
|
|
|
|
namespace Workerman\Connection;
|
|
|
|
|
|
@@ -304,7 +305,7 @@ class TcpConnection extends ConnectionInterface implements JsonSerializable
|
|
|
*
|
|
|
* @var bool
|
|
|
*/
|
|
|
- protected bool $sslHandshakeCompleted = false;
|
|
|
+ protected bool|int $sslHandshakeCompleted = false;
|
|
|
|
|
|
/**
|
|
|
* All connection instances.
|
|
|
@@ -341,7 +342,7 @@ class TcpConnection extends ConnectionInterface implements JsonSerializable
|
|
|
self::$idRecorder = 0;
|
|
|
}
|
|
|
$this->socket = $socket;
|
|
|
- stream_set_blocking($this->socket, 0);
|
|
|
+ stream_set_blocking($this->socket, false);
|
|
|
// Compatible with hhvm
|
|
|
if (function_exists('stream_set_read_buffer')) {
|
|
|
stream_set_read_buffer($this->socket, 0);
|