File tree Expand file tree Collapse file tree 3 files changed +3
-5
lines changed Expand file tree Collapse file tree 3 files changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -122,7 +122,7 @@ private function listenForPackets(Stream $stream)
122
122
private function keepAlive (Stream $ stream , $ keepAlive )
123
123
{
124
124
if ($ keepAlive > 0 ) {
125
- $ interval = ( int ) ( $ keepAlive / 2 ) ;
125
+ $ interval = $ keepAlive / 2 ;
126
126
127
127
$ this ->getLoop ()->addPeriodicTimer ($ interval , function (Timer $ timer ) use ($ stream ) {
128
128
$ packet = new PingRequest ($ this ->version );
Original file line number Diff line number Diff line change @@ -64,8 +64,7 @@ public function __construct(
64
64
$ willMessage = null ,
65
65
$ willQos = null ,
66
66
$ willRetain = null ,
67
- // $keepAlive = 0
68
- $ keepAlive = 10
67
+ $ keepAlive = 0
69
68
) {
70
69
parent ::__construct ($ version );
71
70
$ this ->clientId = $ clientId ;
Original file line number Diff line number Diff line change @@ -107,8 +107,7 @@ class ConnectionOptions
107
107
*
108
108
* @var int
109
109
*/
110
- // public $keepAlive = 0;
111
- public $ keepAlive = 10 ;
110
+ public $ keepAlive = 0 ;
112
111
113
112
/**
114
113
* ConnectionOptions constructor.
You can’t perform that action at this time.
0 commit comments