Skip to content

Commit

Permalink
Update Worker.php with TCP_KEEPIDLE
Browse files Browse the repository at this point in the history
Fix #1071

Changed validation.
  • Loading branch information
joanhey authored Nov 16, 2024
1 parent 4cdd1ca commit 75e266b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Worker.php
Original file line number Diff line number Diff line change
Expand Up @@ -2351,7 +2351,7 @@ public function listen(): void
$socket = socket_import_stream($this->mainSocket);
socket_set_option($socket, SOL_SOCKET, SO_KEEPALIVE, 1);
socket_set_option($socket, SOL_TCP, TCP_NODELAY, 1);
if (PHP_VERSION_ID >= 80200) {
if (defined('TCP_KEEPIDLE')) {
socket_set_option($socket, SOL_TCP, TCP_KEEPIDLE, TcpConnection::TCP_KEEPALIVE_INTERVAL);
socket_set_option($socket, SOL_TCP, TCP_KEEPINTVL, TcpConnection::TCP_KEEPALIVE_INTERVAL);

Check failure on line 2356 in src/Worker.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 - prefer-lowest - ubuntu-latest

Constant TCP_KEEPINTVL not found.

Check failure on line 2356 in src/Worker.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 - prefer-stable - ubuntu-latest

Constant TCP_KEEPINTVL not found.

Check failure on line 2356 in src/Worker.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 - prefer-lowest - macos-latest

Constant TCP_KEEPINTVL not found.

Check failure on line 2356 in src/Worker.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 - prefer-stable - macos-latest

Constant TCP_KEEPINTVL not found.

Check failure on line 2356 in src/Worker.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 - prefer-lowest - windows-latest

Constant TCP_KEEPINTVL not found.

Check failure on line 2356 in src/Worker.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 - prefer-stable - windows-latest

Constant TCP_KEEPINTVL not found.
socket_set_option($socket, SOL_TCP, TCP_KEEPCNT, 1);

Check failure on line 2357 in src/Worker.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 - prefer-lowest - ubuntu-latest

Constant TCP_KEEPCNT not found.

Check failure on line 2357 in src/Worker.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 - prefer-stable - ubuntu-latest

Constant TCP_KEEPCNT not found.

Check failure on line 2357 in src/Worker.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 - prefer-lowest - macos-latest

Constant TCP_KEEPCNT not found.

Check failure on line 2357 in src/Worker.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 - prefer-stable - macos-latest

Constant TCP_KEEPCNT not found.

Check failure on line 2357 in src/Worker.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 - prefer-lowest - windows-latest

Constant TCP_KEEPCNT not found.

Check failure on line 2357 in src/Worker.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 - prefer-stable - windows-latest

Constant TCP_KEEPCNT not found.
Expand Down

0 comments on commit 75e266b

Please sign in to comment.